Environmental Variables Tutorial: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
(Created page with "There are two ways environmental variables are used. First, environmental variables hold information about the computer system you are using. The internal function ENV$ can be...")
 
No edit summary
Line 21: Line 21:
SETENV("SCRN_SIZE_POSN")  will save the current screen size and position for both the new console and the command console, provided they are not minimized to the task bar.  
SETENV("SCRN_SIZE_POSN")  will save the current screen size and position for both the new console and the command console, provided they are not minimized to the task bar.  


[[Tutorial 2|Table of Contents]]
<noinclude>
Next: [[Printing Tutorial]]<br>
Back: [[Tutorial 2|Table of Contents]]
</noinclude>

Revision as of 15:41, 11 July 2013

There are two ways environmental variables are used. First, environmental variables hold information about the computer system you are using. The internal function ENV$ can be used to check these and your system tells BR what they are. They can tell you information about the system, printer path, or temporary folder.

Let's try it out!

In BR, type in:

ENV$(“temp”) 

and your system will return the location of your temporary folder. The variables may differ with each computer, and you should be able to find a list of them within your system settings.

Secondly, environmental variables are variables that don't change or disappear when you switch or close programs, because they're set and remembered in BR itself. (But they are lost when BR is closed). This way, the values of variables can be recorded in one program and used in another.

SETENV and env$

To set environmental variables within BR, use the SETENV function.

For example, SETENV(“startform$”,“5,5,C 30”) will set the variable called startform$ to mean “5,5,c 30”. From then on, using the internal function ENV$(“startform”) will return that value. BR will hold that value until it's changed or until BR closes.

SETENVcan also be used to record the position of screens.

SETENV("SCRN_SIZE_POSN") will save the current screen size and position for both the new console and the command console, provided they are not minimized to the task bar.


Next: Printing Tutorial
Back: Table of Contents