WRITE:TEXT
The values of scalar variables can be written by using the RCHAR function
and the append operator. For example:
WRITE\TEXT FILE.EXT `The value of A is '//RCHAR(A)
WRITE\TEXT FILE.EXT `The value of X['//RCHAR(J)//`] = '//RCHAR(X[J])
A format can also be used, for example:
WRITE\TEXT FILE.EXT `X['//RCHAR(J,`F2.0')//`] = '//RCHAR(X[J],`E12.5')
Suppose you want to write a header line to a file and then write some
data stored in vectors to that file. For example:
WRITE\TEXT FILE.DAT `This is a header line'
WRITE\APPEND FILE.DAT X Y Z
Suppose X is a vector, X = [ 1.1; 2.2; 3.3; 4.4 ], and you
want to write the values of X to a file, with some text. For example:
DO J = 1, LEN(X)
WRITE\TEXT\APPEND FILE.DAT `X['//RCHAR(J,`F1.0')//`] = '//RCHAR(X[J],`F4.1')
ENDDO