ENVIRON$ will retrieve information from the environment table of the operating system.
Syntax:RetStr = ENVIRON$(EnviroVariable AS INTEGER) Return Value:
Parameters:
|
👉 The maximum size for an environment table variable is 32767 bytes. There is the danger of a string buffer overrun if a stock sized 2048 byte string is used as the return string and the size of the environment table variable is larger than 2048. A string should be dynamically sized if the return string buffer is to receive a large value.
System environment variables commonly are used in CGI programming.
DIM RetStr$ RetStr$ = ENVIRON$("COMPUTERNAME") PRINT RetStr$