tips:revmedia:subs18

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tips:revmedia:subs18 [2023/11/05 22:15] – created - external edit 127.0.0.1tips:revmedia:subs18 [2024/06/19 20:20] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== POP.SESSION=====
 +
 +^Published By^Date^Version^Knowledge Level^Keywords^
 +|Revelation Technologies|14 NOV 1989|2.X|EXPERT|POP.SESSION|
 +
 +POP.SESSION is a subroutine that restores the environment 
 +parameters saved by a preceding call to PUSH.SESSION.
 +
 +<code>
 +POP.SESSION(cursor.loc, sentence, record, id, dict, mv)
 +</code>
 +
 +==== Using POP.SESSION ====
 +
 +Use POP.SESSION to restore an environment after use of 
 +PUSH.SESSION.  The saved values are passed from the 
 +PUSH.SESSION argument list.
 +
 +=== cursor.loc ===
 +
 +Use cursor.loc to pass the cursor position saved by 
 +PUSH.SESSION.
 +
 +=== sentence ===
 +
 +Use sentence to pass the TCL sentence saved by 
 +PUSH.SESSION.
 +
 +=== record ===
 +
 +Use record to pass the record saved by PUSH.SESSION
 +
 +=== id ===
 +
 +Use id to pass the record key saved by PUSH.SESSION.
 +
 +=== dict ===
 +
 +Use dict to pass the dictionary variable saved by 
 +PUSH.SESSION.
 +
 +=== mv ===
 +
 +Use mv to pass the array of @MV, @INSERT (see Appendix 1, 
 +"System Variables"), and video attributes saved by 
 +PUSH.SESSION.
 +
 +==== Values returned ====
 +
 +None.
 +
 +
 +==== Correct Use of POP.SESSION ====
 +
 +<code>
 +* The following code restores an environment preserved by PUSH.SESSION
 +
 +DECLARE SUBROUTINE PUSH.SESSION, POP.SESSION, MSG
 +
 +PUSH.SESSION(cursor, sentence, record, id, dict, mv)
 +
 +* Call a subroutine that modifies environment parameters.
 +
 +GOSUB change.environ
 +
 +text     = "The modified values are:"
 +text<<-1>> = "SENTENCE is ":@SENTENCE
 +text<<-1>> = "RECORD is ":@RECORD
 +text<<-1>> = "ID is ":@ID
 +
 +MSG(text, "", "", "")
 +
 +POP.SESSION(cursor, sentence, record, id, dict, mv)
 +
 +text     = "The restored values are:"
 +text<<-1>> = "SENTENCE is ":@SENTENCE
 +text<<-1>> = "RECORD is ":@RECORD
 +text<<-1>> = "ID is ":@ID
 +
 +MSG(text, "", "", "")
 +
 +STOP
 +
 +/* Assign sample values to system variables referenced by 
 +the environment parameters */
 +
 +change.environ:
 +
 +@@SENTENCE = "SELECT SAMPLE.FILE BY ST BY ZIP"
 +@@RECORD   = "SAMPLE"
 +@@ID       = "SAMPLE.ID"
 +
 +RETURN
 +</code>