| Notes |
You can use typeOf to determine the datatype of a user entry or of a return value from another script so you can determine if it can and should be coerced, for example.
Although typeOf returns a four-character type identifier, you never need to use this information in your scripts. Frontier defines a constant for each of these types. They are stored in the Object Database at system.compiler.language.constants and are
also listed in Chapter 1 of the UserTalk Reference Guide. This also means that if you use typeOf in a script where you wish to check the type of an object, you should use the constant value, as in the fifth example, above.
|