Indirection Operator (*)

InstallShield 2020 » InstallScript Language Reference

The indirection operator is a unary operator that can be used to obtain the value stored at the memory location referenced by a pointer variable. The indirection operator must precede the pointer variable name, with no intervening space.

In the following example, nvalue is a number and pnumber is a pointer to a number. The assignment statement is used to copy to nvalue the number being pointed to by pnumber.

    nvalue = *pnumber;

The indirection operator can also be used to pass a value to a function that takes a number value as a parameter, as in the following example:

    somefunction(*pnumber);

The following limitations apply to the indirection operator:

The indirection operator can be used with number pointers only.
The indirection operator cannot be used to assign a value to a memory location.
The indirection operator cannot be used as an argument to a function whose parameter has been defined with the BYREF operator.
The indirection operator cannot be used to declare a pointer.
The indirection operator cannot be used to declare a variable parameter in a function declaration.

See Also