Description

Push.Session is a subroutine that saves the current environment parameters in the variables specified.

Syntax

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.

Parameters

The Push.Session subroutine has the following parameters:

ParameterDescription
cursor.locUse cursor.loc to store the current cursor position.
sentenceUse sentence to store the current value of @SENTENCE (the most recent TCL sentence).
recordUse record to store the current value of @RECORD (the current record).
idUse id to store the current value of @ID (the current record key).
dictUse dict to store the current value of @DICT (the dictionary associated with the primary file).
mvUse mv to store the current value of @MV, @INSERT (see Appendix I, "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..

See also

Pop.Session subroutine

Example

/* 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 modified the environment parameters.
Gosub Change_Environ
Pop.Session(cursor, sentence, record, id, dict, mv)