Definition: |
atom identifier
-- or -- integer i = atom(object x) |
Description: |
This serves to define the atom type. You can also call it like an ordinary function to determine if an object is an atom. |
Comments: |
An atom can hold a single numeric value, ie a floating point or an integer. It can also hold a raw pointer, such as allocated memory
or a call_back address, but that is typically only used when interfacing to external code in a .dll or .so file.
An atom can hold all integer values, but the reverse is not true. When invoked as a function, returns 1 (true) if x is an atom otherwise returns 0 (false). Note that atom(x) and not sequence(x) are effectively identical.
|
Example 1: |
atom a a = 5.99 |
Example 2: |
object line line = gets(0) if atom(line) then puts(SCREEN, "end of file\n") end if |
See Also: | integer, sequence, string, object, Atoms, Core Language |