Data Types


Macro Expert supports 5 primitive data types: Text, Number, Datetime, Binary and Boolean.

  1. Text

    Holds a sequence of characters. The string data type supports + operator and - operator.

    Example A:
    %="abc"+"bcd"%
    ' The preceding expression evaluates to "abcbcd".

    Example B:
    %="abcd"-"bc"%
    ' The preceding expression evaluates to "ad".

    In an expression, the string data should be enclosed by the single or double quotation marks. You may use \' to represent the single quotation sign its self, and use the \" to represent the double quotation sign. For example,

    Example A:
    %'He\'s a student.'%
    ' The preceding expression evaluates to "He's a student.".

    Example B:
    %"He said: \"No\""%
    ' The preceding expression evaluates to "He said: "No"".

  2. Number

    Holds signed IEEE 64-bit (8-byte) double-precision floating-point numbers ranging in value from -1.79769313486231570E+308 through -4.94065645841246544E-324 for negative values and from 4.94065645841246544E-324 through 1.79769313486231570E+308 for positive values. Double-precision numbers store an approximation of a real number.

    Example A:
    %=1+20%
    ' The preceding expression evaluates to "21".

    Example B:
    %=0x10 \ 3%
    ' The preceding expression evaluates to "1".

    In an expression, you may use the hexadecimal notation to represent a number, for example, 0x2A.

  3. Datetime

    Holds date and time values. The datetime supports + operator, - operator, * operator, / opeartor.

    Example A:
    %=#2007-08-10#+1%
    ' The preceding expression evaluates to 2007-08-11.

    Example B:
    %=#2007-08-10#-8%
    ' The preceding expression evaluates to 2007-08-02.

    In an expression, the datetime content should be quoted by the number sign #.

  4. Binary

    Holds the binary data of any kind. This data type is used to represent a structural data for the instruction "Call an External DLL".

    For reading the content in a binary data, you could use the instruction "Advanced Get Variable Value".

  5. Boolean

    The boolean data type has only two possible values: TRUE and FALSE. Use this data type for simple flags that track true/false conditions. A boolean value in the expression is presented by the string TRUE and FALSE.

  6. Additional References