InstallShield 2016 » InstallScript Language Reference
InstallShield help topics employ an extended form of Hungarian notation—a naming convention that uses short, lowercase prefixes to indicate the data type. For example, iPointSize denotes an integer variable, while szFileName indicates a string variable.
Hungarian notation is used in example scripts to indicate the data type of all variables. In function syntax descriptions, Hungarian notation is used for parameter names to indicate the type of data that may be passed in a parameter. For example, the syntax description of BatchDeleteEx shows that it takes two parameters:
BatchDeleteEx ( szKey, nOptions );
The first parameter, identified as szKey, could be a string variable or constant. The second, identified as nOptions, could be a number variable or constant.
Variable Parameters
In those cases where a variable parameter is required, the Language reference employs a special set of two-letter prefixes:
• | The first letter indicates the data type. |
• | The second character is the letter v, for variable. |
In the syntax description for GetDir, the first parameter can be a string variable or constant, but the second parameter must be a variable.
GetDir ( szPath, svDir );
Functions that require variable parameters generally return data to the caller in those parameters.
Prefix Table
Because Hungarian notation makes it easy to recognize a variable’s type, it is strongly recommended that you use Hungarian notation when you create variable names in your own scripts. The table below describes each of the prefixes used in InstallShield.
Prefix |
Data Type |
When Used in Function Syntax |
b |
Boolean (BOOL) |
Boolean constant, literal, or variable. |
bv |
Boolean (BOOL) |
Boolean variable only. Constants and literals not allowed. |
c |
Character (CHAR) |
Character constant, literal, or variable. |
const |
Constant |
Constant or literal. Variables not allowed. |
h |
Handle (HWND) |
Handle variable. |
i |
Integer (INT) |
Integer constant, literal, or variable. |
l |
Long integer (LONG) |
Long integer constant, literal, or variable. |
lv |
Long integer (LONG) |
Long integer variable only. Constants and literals not allowed. |
list |
List (LIST) |
List variable. |
n |
Number (NUMBER) |
Number constant, literal, or variable. |
nv |
Number (NUMBER) |
Number variable only. Constants and literals not allowed. |
p |
Pointer (POINTER) |
Pointer variable. |
pstruct |
Pointer to a defined structure type |
Not used. |
s |
Short integer (SHORT) |
Short integer constant, literal, or variable. |
sz |
String (STRING) |
String constant, literal, or variable. |
sv |
String (STRING) |
String variable only. Constants and literals not allowed. |
struct |
Defined structure type |
Not used. |
See Also
Data Types and Predefined Structures
InstallShield 2016 Help LibraryMay 2017 |
Copyright Information | Flexera Software |