len = GetVar( name, buffer, size, flags )
D0 D1 D2 D3 D4
LONG GetVar( STRPTR, STRPTR, LONG, ULONG )
Gets the value of a local or environment variable. It is advised to only use ASCII strings inside variables, but not required. This stops putting characters into the destination when a line feed (ASCII code 10, '\n') is hit, unless GVF_BINARY_VAR is specified. The line feed is never stored in the buffer.
LV_VAR is the only type that can be global.
Under V36, we documented (and it returned) the size of the variable, not the number of characters transferred. For V37 this was changed to the number of characters put in the buffer, and the total size of the variable is put in
IoErr().
GVF_DONT_NULL_TERM only works for local variables under V37. For V39, it also works for globals.