Please enable JavaScript to view this site.

thinBasic Help Manual

* * HELP & MANUAL PREMIUM PACK 4 DEMO VERSION * *

This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.

This version is copyright and may only be used for local testing purposes. It may not be distributed.

Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.

 

Description

 

Retrieve information from the operating system's master environment table.

 

Syntax

 

s = OS_ENVIRON(EnvironVariableName | EnvironVariableNumber)

 

Returns

 

String.

 

Parameters

 

OS_Environ has only one parameter but it can be a string or a number.

In case of string, it is assumed it is the name of the environment variable. In this case OS_Environ will return the value of the variable.

In case of number, it is assumed it is the position of the variable in the environment table. In this case OS_Environ will return the value of the variable in "position" environment table.

 

Name

Type

Optional

Meaning

EnvironVariableName

String

No


EnvironVariableNumber

Numeric

No


 

Remarks

 

Restrictions

 

See also

 

Examples

 

DIM sItem   AS STRING

DIM lCounter AS LONG

 

'---Retrieve the "PATH" environment variable

sItem = OS_ENVIRON("PATH")

 

'---Enumerate all Environment strings

DO

INCR lCounter

 sItem = OS_ENVIRON(lCounter)

 

'---[process sItem here]

 

LOOP WHILE sItem <> ""

 

Created with Help+Manual 8 and styled with Premium Pack Version 4 © by EC Software