Functions | |
HC_BOOLEAN | Show_Environment (const char *variable, char *value) |
HC_BOOLEAN Show_Environment | ( | const char * | variable, |
char * | value | ||
) |
Allows you to retrieve information from the operating system environment of your running program.
variable | - The name of the environment variable you'd like to inquire about. |
value | - The current value(if any) of the given variable. Passed by reference always. Returned to user. |
Show_Environment() allows your program to retrieve information from its run-time context in the same way that HOOPS retrieves the value of "HOOPS_PICTURE" during startup. You might use this to let your program know that it should go into debugging mode, or that it should look for data files over in a particular disk directory. Or to let your program know that the current user is left-handed, or for any of a large variety of data.
If you want your program to be as portable as possible, it's suggested that variable only contain numbers, underscores, and uppercase letters. Variable might or might not be case-sensitive.
If you're working in C, in order to avoid unpleasant surprises make sure the value buffer is of ample size, or set the "C return length" system option with Define_System_Options() .