is strictly

Typeoperator
DictionaryLCS
LibraryLiveCode Script
Syntax
<value> is 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 the specified type.

Introduced8.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Parameters
NameTypeDescription
value

The expression which will be tested for its type.

Example
"Hello World!" is strictly a string -- evaluates to true
1 + 200 is strictly an integer -- evaluates to true
(100 is 100) is strictly a boolean -- evaluates to true
the compress of "Hello World!" is strictly a binary string -- evaluates to true
RelatedOperator: is not strictly, is a, is not a
Description

Use the is strictly operator to determine the true type of a value. 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 strictly operator differs from is a in that it does not perform any type coercion. For example, x is an integer would return true if x is truly an integer or if it is a string which can be parsed as an integer; whereas x is strictly an integer only returns true if x is currently an integer (and not a string).