.f .ifnot manual .RM 64 .NO NUMBER .NO PAGING .STHL 5,1,1 .endif manual .if MANUAL .hl 1 CLI__ASSIGN - ROUTINE TO SET DCL SYMBOLS FROM A PROGRAM .else MANUAL .nf 2 CLI__ASSIGN ! .br .f .endif MANUAL CLI__ASSIGN is a routine that enables user programs to assign strings to either global or local DCL symbols. This capability is especially useful if a program is required to pass information back to a command language procedure. .if manual .hl 2 Author of CLI__ASSIGN .else manual .br 3 Author .br .endif manual CLI__ASSIGN was written by Kevin Carosso of the OMNIGRAPH project. It is currently supplied and supported by the OMNIGRAPH project. .ifnot manual Any questions about or problems with CLI__ASSIGN should be reported via MAIL to OMNIGRAPH. .endif manual .if manual .hl 2 Calling CLI__ASSIGN .else manual .br 3 Calling .br .endif manual The calling sequence, in FORTRAN, is as follows: .S 1 .I +8 CALL CLI__ASSIGN(SYMBOL,STRING,FLAG) .S 1 Where: .S 1 .NF .LM +14 .I -10 SYMBOL -- is a character variable with the symbol to define .I -10 STRING -- is the text of the symbol .I -10 FLAG -- is 2 for local and 3 for global symbols .BR (passed by value) .S 1 .LM -14 For convenience, the following global symbols can be used. .S 1 .I 4 CLI$K__DEFLOCAL = 2 .I 4 CLI$K__DEFGLOBAL = 3 .S 1 .F In the following example we will assign the string "HERE IT IS" to a DCL symbol, DOOFCITY. The third argument indicates that this is to be a global symbol assignment. .NF .S 1 .I 4 EXTERNAL CLI$K__DEFGLOBAL .I 4 CALL CLI__ASSIGN('DOOFCITY','HERE IT IS',CLI$K__DEFGLOBAL) .S 1 .F The assigned symbol would thereafter be accessible from command language as if the DCL command .S 1 .I 8 $ DOOFCITY :== "HERE IT IS" .S 1 had been executed. .S 1 Since CLI__ASSIGN requires that the first two arguments be passed as standard VAX string descriptors, care must be taken when calling the routine from Pascal. Use the %STDESCR directive to pass an ARRAY OF CHAR to CLI__ASSIGN. .if manual .hl 2 Location of the CLI__ASSIGN routine .else manual .br 3 Location .br .endif manual The source to CLI__ASSIGN is the file: .s 1 .i 8 DEV:[OMNIGRAPH.UTILITY]CLIASSIGN.MAR .s 1 CLI__ASSIGN is in the object library POWELL. All that needs to be done is to request this library at link time. This would appear as: .s 1 .i 8 $ LINK PROG,TOOLS:POWELL/LIB .s 1 The CLI__ASSIGN routine will then be loaded into your program.