Table of Contents

PUSH.SESSION

Published ByDateVersionKnowledge LevelKeywords
Revelation Technologies14 NOV 19892.XEXPERTPUSH.SESSION

PUSH.SESSION is a subroutine that saves the current environment parameters in the variables specified.

PUSH.SESSION(cursor.loc, sentence, record, id, dict, mv)

Using PUSH.SESSION

Use PUSH.SESSION to save the values of certain environment variables:

@SENTENCE
@RECORD
@ID
@DICT
@MV
@INSERT

as well as the current cursor position and video attributes.

cursor.loc

Use cursor.loc to store the current cursor position.

sentence

Use sentence to store the current value of @SENTENCE (the most recent TCL sentence).

record

Use record to store the current value of @RECORD (the current record).

id

Use id to store the current value of @ID (the current record key).

dict

Use dict to store the current value of @DICT (the dictionary associated with the primary file).

mv

Use mv to store the current value of @MV, @INSERT (see Appendix 1, System Variables), and the current video attributes (delimited by @RM).

Values returned

PUSH.SESSION passes the current session values described above in the argument list.

Correct Use of PUSH.SESSION

/* The following code demonstrates the use of 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