Standard Function Library - Details - System Functions
Xst ( )
XstVersion$ ( )
XstCauseException ( exception )
XstErrorNameToNumber ( @error$, @error )
XstErrorNumberToName ( error, @error$ )
XstExceptionNameToNumber ( @exception$, @exception )
XstExceptionNumberToName ( exception, @exception$ )
XstFileToSystemFile ( fileNumber, @systemFileNumber )
XstGetApplicationEnvironment ( @standalone, @reserved )
XstGetCommandLineArguments ( @argc, @argv$[] )
XstGetConsoleGrid ( @grid )
XstGetCPUName ( @cpu$ )
XstGetDateAndTime ( @year, @month, @day, @weekDay, @hour, @minute, @second, @msec )
XstGetEndian ( @endian$$ )
XstGetEndianName ( @endian$ )
XstGetEnvironmentVariable ( @name$, @value$ )
XstGetEnvironmentVariables ( @count, @envp$[] )
XstGetException ( @exception )
XstGetExceptionFunction ( @function )
XstGetOSName ( @name$ )
XstGetOSVersion ( @major, @minor )
XstGetOSVersionName ( @version$ )
XstGetPrintTab ( @pixels )
XstGetSystemError ( @error )
XstGetSystemTime ( @msec )
XstKillTimer ( timer )
XstSetCommandLineArguments ( argc, @argv$[] )
XstSetDateAndTime ( year, month, day, weekDay, hour, minute, second, msec )
XstSetEnvironmentVariable ( @name$, @value$ )
XstSetExceptionFunction ( function )
XstSetPrintTab ( pixels )
XstSetSystemError ( sysError )
XstSleep ( msec )
XstStartTimer ( @timer, count, msec, callFunc )
XstSystemErrorToError ( sysError, @error )
XstSystemErrorNumberToName ( sysError, @sysError$ )
XstSystemExceptionNumberToName ( sysException, @sysException$ )
XstSystemExceptionToException ( sysException, @exception )

Xst()  Xst ( ) 

Initialize the standard function library. Every program must call this function before it calls any other standard library function. 

Xst() can be called any number of times without adverse effects.

XstVersion$()  version$ = XstVersion$ ( ) 

Return a string containing the standard function library version.

XstCauseException()  XstCauseException ( exception ) 

Cause the specified exception. exception is the native exception number, not the system exception number.

XstErrorNameToNumber()  XstErrorNameToNumber ( error$ , @ error ) 

Convert the one or two part error name in error$ into an error number. See xst.DEC for $$ErrorObject and $$ErrorNature constants.

XstErrorNumberToName()  XstErrorNumberToName ( error , @ error$ ) 

Convert the one or two part error number into an error$ name.

XstExceptionNameToNumber()  XstExceptionNameToNumber ( exception$ , @ exception ) 

Convert a native exception$ name into a native exception number.

XstExceptionNumberToName()  XstExceptionNumberToName ( exception , @ exception$ ) 

Convert a native exception number into a native exception$ name.

XstFileToSystemFile()  XstFileToSystemFile ( filenumber , @ systemFilenumber ) 

Convert a native filenumber returned by OPEN() into the systemFilenumber - the file number or handle the operating system refers to the file with. This makes it possible to call operating system functions directly to get information about the file.

XstGetApplicationEnvironment()  XstGetApplicationEnvironment (@ standalone , @ reserved ) 

Return a standalone variable to tell whether the program is currently running as a standalone executable as opposed to in the environment.

XstGetCommandLineArguments()  XstGetCommandLineArguments (@ argCount , @ argv$ []) 

Return the number of command line arguments in argCount, and the command line argument strings in argv$[]. argCount should never be 0 or less, since the name of the program is the first argument, unless XstSetCommandLineArguments() has changed them. 

Call XstGetCommandLineArguments() with (argCount < 0 ) to get the original argCount and argv$[] in the event they have been changed by XstSetCommandLineArguments() .

XstGetConsoleGrid()  XstGetConsoleGrid (@ grid ) 

Return the grid number of the default console grid in grid. GuiPrograms usually do not input or display information with the console window, and its presence on the display is superfluous. Therefore, many programs send a HideWindow or DestroyWindow message to the console grid to remove it from the display.

XstGetCPUName()  XstGetCPUName (@ name$ ) 

Return the generic name of the central processor unit in name$.

XstGetDateAndTime()  XstGetDateAndTime (@ year , @ month , @ day , @ weekDay , @ hour , @ min , @ sec , @ msec ) 

Get the current date and time in GMT (Greenwich mean time). weekDay refers to the day of the week, as in Sunday, Monday, etc, and may not be available on some systems.

XstGetEndian()  XstGetEndian (@ endian$$ ) 

Return a 64-bit endian descriptor that contains the following 8 bytes: 0x00 , 0x01 , 0x02 , 0x03, 0x04, 0x05, 0x06, 0x07 in the lowest to highest addresses of endian$$. The value of endian$$ is therefore 0x0706050403020100 on little endian systems, and 0x0001020304050607 on pure big endian systems.

XstGetEndianName()  XstGetEndianName (@ endian$ ) 

Return "LittleEndian" or "BigEndian" in endian$.

XstGetEnvironmentVariable()  XstGetEnvironmentVariable (@ name$ , @ value$ ) 

Get the string value$ of the environment variable with called name$. For example, XstGetEnvironmentVariable (@"PATH", @path$) .

XstGetEnvironmentVariables()  XstGetEnvironmentVariables (@ count , @ envp$ []) 

Return the number of environment variable strings in count, and the environment variable strings in envp$[]. The strings contain both the name of the environment variable and its value, separated by an " = ", as in "PATH=c:\windows; c:\windows\system; c:\xb" .

XstGetException()  XstGetException (@ exception ) 

Return the native exception number of the most recent exception.

XstGetExceptionFunction()  XstGetExceptionFunction (@ functionAddress ) 

Get the address of the current exception function in functionAddress. When an exception occurs in a standalone program, the exception function established by XstSetExceptionFunction() is executed.

XstGetOSName()  XstGetOSName (@ name$ ) 

Return the operating system name in name$. Examples include " Windows ", " WindowsNT ", " UNIX ", " OS2 ". See XstGetVersion() .

XstGetOSVersion()  XstGetOSVersion (@ major , @ minor ) 

Return the major and minor portions of the operating system version. The major and minor part are the integer and fractional portions of the complete version number, so version 3.10 of the Windows operating system, major = 0x0003 and minor = 0x000A .

XstGetOSVersionName()  XstGetOSVersionName (@ version$ ) 

Return the operating system version$ number.

XstGetPrintTab()  XstGetPrintTab (@ pixels ) 

Return the number of pixels between tab positions in the console.

XstGetSystemERROR()  XstGetSystemError (@ sysError ) 

Return the most recent operating system sysError number.

XstGetSystemTime()  XstGetSystemTime (@ msec ) 

Return the value of the free running time in msec.

XstKillTimer()  XstKillTimer ( timer ) 

Kill the specified timer.

XstSetCommandLineArguments()  XstSetCommandLineArguments ( argCount , @ argv$ []) 

Set the number of command line arguments to argCount, and the command line argument strings to argv$[]. argCount should never be less than 0 .

XstSetDateAndTime()  XstSetDateAndTime ( year , month , day , weekDay , hour , min , sec , msec ) 

Set the current system date and time. This function may fail if the user running the task does not have supervisor or administrator priority.

XstSetEnvironmentVariable()  XstSetEnvironmentVariable (@ name$ , @ value$ ) 

Set environment variable name$ to value$. For example, XstSetEnvironmentVariable (@"PATH", @"c:\windows") .

XstSetExceptionFunction()  XstSetExceptionFunction ( functionAddress ) 

Set the exception function to functionAddress. When exceptions occur in standalone programs, the exception function is executed. The exception function must take zero arguments.

XstSetPrintTab()  XstSetPrintTab ( pixels ) 

Set the number of pixels between tab positions in the console.

XstSetSystemERROR()  XstSetSystemError ( error ) 

Set the current operating system error number.

XstSleep()  XstSleep ( msec ) 

Suspend program execution for msec milliseconds. While a program sleeps, other programs get an opportunity to run.

XstStartTimer()  XstStartTimer (@ timer , count , msec , function ) 

Create a timer, set its cycle count, set its msec countdown time, set its four argument timeout function () address, and start the timer. 

Each time the timer times out, XstStartTimer() calls: 

@ function ( timer , @ count , msec , time ) 

function () can kill the timer in the following ways: 
return -1 
set count = 0 
set count = -1 
call XstKillTimer (timer) 

function () must accept four XLONG arguments, and can change count to change the number of timeout cycles remaining.

XstSystemErrorToERROR()  XstSystemErrorToError ( sysError , @ error ) 

Convert an operating system error number to a native error number.

XstSystemErrorNumberToName()  XstSystemErrorNumberToName ( error , @ error$ ) 

Convert a system error number into an error$ name string.

XstSystemExceptionNumberToName()  XstSystemExceptionNumberToName ( sysException , @ sysException$ ) 

Convert an operating system exception number into a string name.

XstSystemExceptionToException()  XstSystemExceptionToException ( sysException , @ exception ) 

Convert an operating system exception into a native exception.