forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathis-not-strictly.lcdoc
More file actions
57 lines (40 loc) · 1.71 KB
/
is-not-strictly.lcdoc
File metadata and controls
57 lines (40 loc) · 1.71 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
Name: is not strictly
Type: operator
Syntax: <value> is not strictly { nothing | a boolean | an integer | a real | a string | a binary string | an array }
Summary:
Evaluates to true if the actual type of <value> is not the specified
type.
Introduced: 8.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Example:
"Hello World!" is not strictly a string -- evaluates to false
Example:
1 + 200 is not strictly an integer -- evaluates to false
Example:
(100 is 100) is not strictly a boolean -- evaluates to false
Example:
the compress of "Hello World!" is not strictly a binary string -- evaluates to false
Parameters:
value:
The expression which will be tested for its type.
Description:
Use the <is not strictly> operator to determine what the true type of
a value is not. The true type of a value is the representation which
the engine is currently holding for it, without performing any
implicit type coercion. The true type of a value can be one of the
following:
- nothing: no value, typically seen as <empty>
- boolean: either true or false, typically seen as the result of a
comparison operator
- integer: a number with no fractional part
- real: a number with a fractional part
- string: a piece of text (sequence of characters)
- binary string: a sequence of bytes
- array: an associative array
The <is not strictly> operator differs from <is not a> in that it does
not perform any type coercion. For example, `x not is an integer`
would return false only when `x` is neither an integer nor a string
which parses as an integer; whereas `x is not strictly an integer`
only returns false if `x` is not currently an integer.
References: is strictly (operator), is a (operator), is not a (operator)