Number type

From MiniScript Wiki
Revision as of 22:12, 1 November 2020 by JoeStrout (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

number returns a map that represents the number datatype in MiniScript's core type system.

See also: string; list; map; funcRef

Usage Notes

number can be used with isa to check whether a variable refers to a number. You can also assign new methods here to make them available to all maps(though because of a limitation in MiniScript's parser, such methods do not work on numeric literals).

Example

42 isa number		// returns 1