|
Advanced Set Variable Value
this action is only for the advanced user who has experience in programing.
Set the value of a variable and resize the variable's buffer. The instruction is useful to the instruction "Call an External DLL". The user uses the instruction to initialize the variable which
would be a parameter for DLL function.
Parameters
-
Variable name Specifies the variable's name.
-
Convert value to Specifies how to store the variable, it can be the following:
- Does not change the content in variable
- Clears the content in variable
- Stores as string value
- Stores as number value
- Stores as datetime value
- Stores as binary value
-
Offset Specifies the start position of writing value in the variable buffer.
-
Variable value Specifies the content to be stored into the variable.
-
Variable value is plain-text With the option checked, the specified variable value will store into the variable without any preprocessing.
-
Reallocate variable space Specifies the new size for the variable's buffer, it expends the buffer automatically. If the size less than the current data size, the rest data will be truncate.
-
Set data size as well Specifies the new size of the variable data. The option is useful when the variable is used to retrieve the data from an extern DLL API because the most API function just places the data into the buffer without the length of the data.
-
Limit block size of writing By default, the specified content will be written and the variable's buffer automatically extends to fit the size of the content. With the option checked, the size of the writing will be limited in the specified length.
-
In bytes The option is only available if the variable data type is the string. In this application, each character nestling snugly into two bytes (UNICODE) of storage and the unit of string value is the character. With the option checked, the unit of parameters in this action will treat as the byte.
Syntax of expression
- String value
The content should be a standard expression.
- Datetime value
The content must be quoted by the number sign '#', for example: #2007-01-01 08:30#
- Number value
Supports hexadecimal notation, for example: 0x01A
- Boolean value
String TRUE or FALSE.
- Struct data(Binary data)
The structural data should be declared by the following syntax:
<Data type code>:<content 1>;
<Data type code>:<content 2>;
...
<Data type code>:<content n>;
Code of Data Type | Short Code | Data Type | Description |
Integer | I | Integer | 2 bytes, the hexadecimal notation 0x is supported. |
Long | L | Long | 4 bytes, the hexadecimal notation 0x is supported. |
Byte | B | Byte | 1 bytes, the hexadecimal notation 0x is supported. |
String[length] | S[length] | Text in DBCS | The member's size will be determined by the optional length or the actual size of the content.
If the character space is included in the text,
the text must be quoted by the single or double quotation marks. In this case, the quotation marks could be represented
by \' or \". |
WString[length] | W[length] | Text in Unicode |
Date | D | Date and time | 16 bytes (same as SYSTEMTIME in Windows API), the content should be
quoted by the number sign '#'. |
Pointer | P | Pointer | 4 bytes, a pointer to the buffer of a variable. |
Example A:
Integer:10; Long:200; Date:#2007-09-20#; Pointer:v_size;
Example B:
String:Hello; Long:200; String260:"Jack Lee";
Example C: (short code of data type)
S:Hello; L:0x200; S260:"Jack Lee";
Notes
For more information about the expression, please refer to Variable and Expression.
For the maximum compatibility, the members in the structural data always be aligned on natural boundaries.
|