forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathis-not-a.lcdoc
More file actions
81 lines (46 loc) · 1.85 KB
/
is-not-a.lcdoc
File metadata and controls
81 lines (46 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Name: is not a
Synonyms: is not an
Type: operator
Syntax: <value> is not a[n] {boolean | integer | number | point | rect| date | color | ASCII string}
Summary:
<evaluate|Evaluates> to true if a <value> is not of the specified type,
false otherwise.
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Example:
22 is not a number
Example:
CJ22 is not a number
Example:
numToChar(128) is not an ASCII string -- evaluates to true
Parameters:
value:
Any source of value.
Description:
Use the <is not a> <operator> to <validate> data to make sure it's not
the wrong type.
This operator is useful for checking whether the user has entered data
correctly, and for checking parameters before sending them to a handler
to avoid a script error caused by feeding data of one type to an
operator or function that requires a different type.
A <value> is a:
* boolean or logical if it is one of the two constants true or false
* integer if it consists of digits (with an optional minus sign)
* number if it consists of digits, optional leading minus sign, optional
decimal point, and optional "E" or "e" (scientific notation)
* point if it consists of two numbers separated by a comma
* rect if it consists of four numbers separated by commas
* date if it is in one of the formats produced by the date or <time>
functions
* color if it is a valid color reference
* ASCII string if it does not contain any characters greater than
charToNum(127)
All the types other than boolean can also include leading or trailing
white space characters.
The <is not a> <operator> is the logical inverse of the <is a>
<operator>. When one is true, the other is false.
References: value (function), time (function), evaluate (glossary),
operator (glossary), validate (glossary), point (keyword),
integer (keyword), is a (operator)
Tags: math