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)


  • No labels

1 Comment

  1. PSA for this routine and the companion Pop.Session Subroutine. While these do work in OpenInsight, they are still technically considered AREV commands and as such might create unexpected problems. For instance, we discovered that when executed during a web API procedure, this would result in the OECGI call failing and returning a 502 Bad Gateway error. With Bryan Shumsky's help, we figured out that these routines are designed to update the AREV UI. In AREV32 this is handled through SEND_DYN which then communicates to the engine. This results in the API response being corrupted because it is being pushed through the same stream.