This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| crpl:docs:eq [2013/12/03 17:47] – Added code examples Grauniad | crpl:docs:eq [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ~~DISCUSSION~~ | + | |
| <- [[crpl: | <- [[crpl: | ||
| ===== eq ===== | ===== eq ===== | ||
| Line 13: | Line 13: | ||
| === Comparing unlike types === | === Comparing unlike types === | ||
| When trying to do a comparison where one argument is a string and the other is an int, the string gets coerced into an int. If the string is something like " | When trying to do a comparison where one argument is a string and the other is an int, the string gets coerced into an int. If the string is something like " | ||
| + | |||
| + | In particular, if x may be a string or number, (<-x " | ||
| The ' | The ' | ||
| Line 38: | Line 40: | ||
| Trace(< | Trace(< | ||
| Trace(< | Trace(< | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | # If core doesn' | ||
| + | # Then " | ||
| + | Trace(GetScriptVar(< | ||
| + | # The following version returns TRUE only if core has Script.crpl attached with | ||
| + | # a variable " | ||
| + | Trace(GetScriptVar(< | ||
| </ | </ | ||