Environment Variables and Global Signals

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Environment Variables and Global Signals >

Environment Variables and Global Signals

EVE. -  Environment Variable Expand

Previous Top Next


MiniRobotLanguage (MRL)

 

EVE. Command

Environment Variable Expand

 

 

Intention

 

Expands Environment Variables. It will expand one or more environment-variables in the given P1 parameter. The result will be on TOS (Top of Stack) or in P2 (Parmeter 2) if given.

 

Usage is as simple as you can see in the picture below.

 

graphic

 

While in normal use, you should always use variables which would look like this:

 

: $$WIN=%windir%

EVE.$$WIN

MBX.The result is: $tos$

ENR.

 

With exactly the same result. You can give a second parameter, in that case the result will not be on TOS (Top of Stack(, but in that variable.

 

: $$WIN=%windir%\system\

EVE.$$WIN|$$RES

MBX.The result is: $$RES

ENR.

 

EVE. allows you to work "from stack to stack". If you do this:

 

VAR.§§WER=%windir%

PUV.§§WER

STS.DUMP

EVE.

STS.DUMP

 

This is how the stack will look like:

 

graphic

 

If you just want to get the value of a Environment variable, you should use EVG.

Use EVS. to set/change the value of environment variables.

 

 

 

Syntax

 

 

EVE.P1[|P2]

 

 

Parameter Explanation

 

P1 - (in) Environment variable

P1 - (optional) (out) Variable if omitted, TOS is used

 

 

Example

 

'**********************************************

' EVE. - Sample

'**********************************************

'DBM.2

VAR.§§WER=%windir%

PRT.Unexpanded: §§WER

EVE.§§WER

PRT.from stack ->$$000-

PRT.===========================================

VAR.§§WER=%windir%

PRT.Unexpanded: §§WER

EVE.§§WER|$$RES

PRT.from variable->$$RES-

PRT.===========================================

DMP.4

 

:over

MBX.Halt to read output

'**********************************************

 

 

 

Remarks

-

 

 

Limitations:

 

-

 

 

 

See also:

 

    EVG. - Environment Variable Get

    EVS. - Environment-Variable-Set