Go to the first, previous, next, last section, table of contents.


GRG Procedures

These are functions that can be called from the GUILE side code. They allow the GUILE side to read and manipulate GRG system variables and read database fields.

The grg_getstrsysvar(s) procedure takes a string which is the name of a string valued system variable and returns its current value, eg. (display grg_getstrsysvar("_eq_extn")) to display the value of the _eq_extn variable.

The grg_getnumsysvar(s) procedure takes a string which is the name of a numeric valued system variable and returns its current value, eg. (display grg_getstrsysvar("_eq_verbose")) to display the value of the _eq_verbose variable.

The grg_putstrsysvar(s,v) procedure takes a string which is the name of a string valued system variable and a string which is the value to assign to that variable. It returns the assigned value, eg. (display grg_putstrsysvar("_eq_extn",".html")) to change the value of the file extension and to display the change to the user.

The grg_putnumsysvar(s,v) procedure takes a string which is the name of a numeric valued system variable and a number which is the value to assign to that variable. It returns the assigned value, eg. (display grg_putnumsysvar("_eq_verbose",0)) to reset the value of the verbose state.

The grg_getfield(f,r,d) procedure takes three arguments: the name of a field (string), a record (number) from 1 to the number of records, and the name of a database (string) to which the field is defined in. It returns the value of the given field of the given record in the given database. For example, (display grg_getfield("NAME",2,"people")) would display the value of the "Name" field of the 2nd record of the "people" database. This is the equivalent of the fully dereferenced field mechanism in the native language, ie. the above would be %people->NAME[2].


Go to the first, previous, next, last section, table of contents.