Modules

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Variable Definitions and Operations > MOD. - Modules >

Modules

MOD.Get Last Name

Previous Top Next


MiniRobotLanguage (MRL)

 

MOD.Get Last Name

Return the last module's name.

 

 

 

Intention

 

The module where the script came from before it entered this module, where it is now, is internally remembered.

To return this last module's name you can use this command.

 

 

 

 

Syntax

 

 

MOD.Get Last Name[|P1]

 

 

Parameter Explanation

 

P1 - (optional) Is a return Variable, if omitted the result will be on TOS.

 

 

 

Example

 

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

' MOD.Get Last Name-Sample

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

$$VAA=In Main

PRT.$$VAA

MOD.New|Left

MOD.New|Right

MOD.New|Other

GSB.Test

MOD.Enter|Main

MOD.Get Last Name|$$KEP

GSB.Test

GSB.LeftSub

DMP.gv

GSB.Test

GSB.Rightsub

DMP.gv

GSB.Test

DMP.gv

MBX.!

ENR.

'-----------------------------------------------------------

:LeftSub

MOD.Enter|Left

MOD.Get Last Name|$$KEP

PRT.Left KEP1 is: $$KEP

GSB.Test

' Here we leave to the Module which we came from.

PRT.Left KEP2 is: $$KEP

MOD.Leave|$$KEP

RET.

'-----------------------------------------------------------

:Rightsub

MOD.Enter|Right

MOD.Get Last Name|$$KEP

PRT.Right KEP1 is: $$KEP

GSB.Test

' We remeber where we came from at the start here

' WE can now Switch Modes as we like

GSB.Othersub

PRT.Right KEP2 is: $$KEP

' Here we leave to the Module which we came from.

MOD.Leave|$$KEP

RET.

'-----------------------------------------------------------

:Othersub

MOD.Enter|Other

MOD.Get Last Name|$$KEP

PRT.Other KEP1 is: $$KEP

GSB.Test

PRT.Other KEP2 is: $$KEP

MOD.Leave|$$KEP

RET.

'-----------------------------------------------------------

:Test

MOD.Get Last Name|$$THI

PRT.We came from: $$THI

MOD.Get Name|$$CUR

PRT.We are here: $$CUR

RET.

'-----------------------------------------------------------

 

 

 

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also: