Output Mode Functions

VOID linemode(void);

use line output mode

VOID pagemode(INT, INT);

use page output mode with given page size

VOID col(INT);

position to column in output

VOID row(INT);

position to row in output


position to (row, col) coordinate in output

VOID pageout(void);

output page buffer

STRING nl(void);

newline character

STRING sp(void);

space character

STRING qt(void);

double quote character


send program output to this file

STRING outfile(void);

return name of current program output file

VOID copyfile(STRING);

copy file contents to program output file

VOID print(STRING, [STRING], [...]);

print string to standard output window

Reports can be generated in two modes, line mode and page mode. Linemode selects line mode and pagemode selects page mode; line mode is the default. The first parameter to pagemode is the number of rows per page; the second parameter is the number of columns per page. When in the line mode report output is written directly to the output file as the program runs, line by line. When in page mode output is buffered into pages which are written to the output file when pageout is called. Page mode is useful for generating charts (eg, pedigree charts or box charts) where it is convenient to compute the two-dimensional location of output.

Col positions output to the given column. If the current column is greater than the argument, col positions output to the given column on the next line. Col works in both modes.

Row positions output to the first character in the given row; row can only be used in page mode.

Pos positions output to a specified row and column coordinate; the first argument specifies the row, and the second specifies the column. Pos can only be used in page mode.

Nl write a new line character to the output file; sp writes a space character to the output file; and qt writes a quote character to the output file. Note that \n and \' can be used within string values to represent the newline and double quote characters.

Newfile specifies the name of the report output file. Its first argument is the file's name; its second argument is an append flag - if its value is non-zero the report appends to this file; if its value is zero the report overwrites the contents of the file. Newfile can be called many times; this allows a single report program to generate many report output files during one execution. Programs are not required to use newfile; if it is not used then LifeLines automatically asks for the name of the report output file.

Outfile returns the name of the current report output file.

Copyfile copies the contents of a file to the report output file; its argument is a string whose value is the name of a file; if the file name is not absolute nor relative, then the LLPROGRAMS environment variable, if set, will be used to search for the file; the file is opened and its contents copied to the report output file.

Print prints its argument string to the standard output window; print may have one to 32 arguments.