PlugSpacePop

Stack
Stack Position Description
Stack(In) top -
Stack(Out) top -

The PlugSpace which has been saved last via statement PlugSpacePush, gets reactivated. The current PlugSpace allocation is lost. If PlugSpacePop gets called, although no according PlugSpacePush has been executed before, the ClassiX System answers with a problem report.

Example

 

Var(txn1, txn2)

// Set variables

CreateTransObject(CX_TRANSACTION) -> txn1

"Object 1" txn1 Put(comment)

// initialize plugspace vector

[ txn1 ] PlugSpace

// Check value

Plug(comment)

// Result   = "Object 1"

 

// ## Now push the PlugSpace on hold and set a new one ##

PlugSpacePush

 

CreateTransObject(CX_TRANSACTION) -> txn2

"Object 2" txn1 Put(comment)

// initialize plug space vector

[ txn2 ] PlugSpace

// Check value

Plug(comment)

// Result   = "Object 2"

 

// ## Now we pop back the parked PlugSpace and check the value again ##

PlugSpacePop

 

// Check value

Plug(comment)

// Result   = "Object 1"

 

Related topics: