Custom function argument list formats

You can enter a function's arguments as a list. If the list has more than one argument, separate the arguments in the list with commas. You can list any number of arguments, but the number of arguments must match the number of arguments that the function accepts.

The following table shows the valid argument types:

Argument type Meaning Equivalent C or Windows type
Char

Signed byte

char

Byte

Unsigned byte

unsigned char, BYTE

Short

Signed integer

int, short, BOOL

Word

Unsigned integer

unsigned, HANDLE, HGLOBAL, HWND, UINT, WORD

Long

Signed long integer

Long, LONG

Dword

Unsigned long integer

unsigned long, DWORD

Float

Floating point

float

Double

Double-precision floating point

double

Pointer

Far pointer

far, LPRECT, LPPOINT

String

Far pointer to zero-terminated string

LPCSTR, LPSTR

Void*

No arguments

void, VOID*

* Void signifies that the function accepts no arguments. Void must appear by itself in an argument list.

Internally, Authorware represents all variables and calculated values as signed long integers, double-precision floating point values, or zero-terminated strings. When a custom function is called, the arguments that appear in the expression are converted to the argument type required by the function, according to the rules in the following table:

Required argument type Integer Real String
char, byte, short, word

Truncated

Converted to integer and truncated

Converted to integer and truncated

long, dword

Unchanged

Truncated to signed long integer

Converted to signed long integer

float

Converted to floating- point value

Truncated to floating point value

Converted to floating point value

double

Converted to double-precision floating-point value

Unchanged

Converted to double-precision floating point value

pointer

Unchanged

Truncated to signed long integer

Far pointer to string

string

Far pointer to formatted string representation of value

Far pointer to formatted string representation of value

Far pointer to string

For the pointer argument type, integer values are passed directly. For the string argument type, the value is first converted to a zero-terminated string and then the string's address is passed to the function.

For example, suppose there is a function MyFunc, which requires a single string argument. When it is called with the expression MyFunc(123), Authorware first converts the integer 123 into the zero-terminated string "123" and then passes that string's address to MyFunc.


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/authorware/7/using_aw_en/09_var44.htm