Custom function return type formats

The following table shows the valid return types:

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

Handle to zero-terminated string

HANDLE containing a zero-terminated string

void

No return value

void, VOID

The values that the function returns are converted to one of the function's types. The possible value types are converted as shown in the following table:

Function return type Result

char, short

Sign extended to long integer

byte, word

Promoted to long integer without sign extension

long, dword

Unchanged

float

Promoted to double-precision floating point value

double

Unchanged

pointer

Cast to long integer

string

String