Difference between revisions of "ENVIRON"

From QB64 Wiki
Jump to navigation Jump to search
(Created page with "The ENVIRON statement is used to temporarily set or change an environmental string value. {{PageSyntax}} : ENVIRON {{Parameter|stringExpression$}} {{PageDescriptio...")
 
Line 12: Line 12:
* If the parameter ID did not previously exist in the environmental string table, it is appended to the end of the table.
* If the parameter ID did not previously exist in the environmental string table, it is appended to the end of the table.
* If a parameter ID did exist, it is deleted and the new value is appended to end of the list.
* If a parameter ID did exist, it is deleted and the new value is appended to end of the list.
* The [[_ENVIRONCOUNT]] function returns the number of key/value pairs currently exist.
* Any changes made at runtime are discarded when your program ends.
* Any changes made at runtime are discarded when your program ends.




{{PageSeeAlso}}
{{PageSeeAlso}}
* [[ENVIRON$]]
* [[ENVIRON$]], [[_ENVIRONCOUNT]]
* [[Windows Environment]]
* [[Windows Environment]]




{{PageNavigation}}
{{PageNavigation}}

Revision as of 15:45, 9 October 2021

The ENVIRON statement is used to temporarily set or change an environmental string value.


Syntax

ENVIRON stringExpression$


Description

  • The stringExpression$ must include the environmental parameter ID and the setting:
    • Using an = sign: ENVIRON "parameterID=setting"
    • Using a space: ENVIRON "parameterID setting"
  • If the parameter ID did not previously exist in the environmental string table, it is appended to the end of the table.
  • If a parameter ID did exist, it is deleted and the new value is appended to end of the list.
  • The _ENVIRONCOUNT function returns the number of key/value pairs currently exist.
  • Any changes made at runtime are discarded when your program ends.


See also



Navigation:
Keyword Reference - Alphabetical
Keyword Reference - By Usage
Main Wiki Page