Register forum user name Search FAQ

Scripting data types

Below are the types of data you can supply to script routines (as shown in the "prototypes" for each script function).

BOOL

True or False.

Lua type: boolean

boolean

True or False.

Lua type: boolean

BSTR

A character string (eg. "swordfish").

Lua type: string

Strings are stored as "null-terminated". That is, a byte with the value 0 (null) indicates the end of a string. Thus, strings may not contain imbedded null characters.

IDispatch

An object reference.

Lua type: not supported

long

A 32-bit number (from -2147483647 to +2147483647).

Lua type: number

short

A 16-bit number (from -32768 to +32767).

Lua type: number

date

A date/time field.

Lua type: number

VARIANT

A Visual-Basic "variant" data type, which can hold different types of data. A variant can be "null", "empty", or contain a number, character string, or an array, amongst other things. You can use the Visual Basic "VarType" function to find exactly what sort of data is in a variant.

Lua type: any (all variables in Lua can be any type)

void

No return value.

Lua type: nil




The safest way to test for "true" or "false" is to assume that zero (0) is false, and any other value is true.

Similarly, to supply the value "true" simply supply a 1, and to supply the value "false", supply the value 0.


See Also ...

Topic

Scripting

Scripting data types
Scripting functions list
Scripting return codes list

(Help topic: general=data_types)

Documentation contents page


Search ...

Enter a search string to find matching documentation.

Search for:   

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.