The Command Line

Command Line

The command line is entered at the "cmd" prompt or within a command batch file. The command line, like any other command line, starts with the name of the system. The first part of the command line consists of arguments ( or parameters ) that control how the GraRLS system operates. Then comes the user program to run. This is followed by arguments that are passed to the user program.

cmdline ::= grarls sysparms userprog progparms

System Parameters

A number the following options have a size parameter. This is always of the form:- widthxheight. For example "640x480". These dimensions are in pixels. Note: there must be no spaces within the specifier.

The size may have one or more suffixes controlling some aspects of the canvas. These are :-

Code Meaning
L Rotate image so that it can be viewed from the left - for printing on the verso page.
R Rotate image so that it can ve viewed from the right - for printing on the recto page.
P Paper 'colourmix' mode ( default ).
S Screen 'colourmix' mode.

For example 320x200L.

Any filename on the command line can be of the form node:/file. The node is any directory path defined within an initialisation file. For example "MYPROGS:/testprog.grs".

-avi size

This will produce a standard Microsoft AVI format video file of the specified size. This option is only available on the professional version.

-bmp size

This will produce a standard BMP format graphics file of the specified size.

-fps rate

This set the frame rate in frames per second for video output.

-ini file

This will tell the system that the next argument is the name of an initialisation file.

-lib

Build a library. Only the professional version of the system accepts this option. The name of the generated library will the same as the basename of the primary source file with the extension ".grl" added.

-lng language

This will set the language used for month names etc. The value should be the basename of a language file in the "LANGFILES" directory as set up in the initialisation file.

-out directory

This will set the output directory for the generated graphics files or compiled files.

-pat size

This will produce GraRLS specific pattern file of the specified size.

-png size

This will produce a standard PNG format graphics file of the specified size.

-prg

Build a precompiled program. Only the professional version of the system accepts this option. The name of the generated program will the same as the basename of the primary source file with the extension ".grx" appended.

-qty quality

This sets the quality of compressed images. The value should be in the range 1 to 100. The special value 0 means no compression. The exact effect depends on the type of output file.

-ver

This will print out the version information for the system.

User Program

The user program can be either the name of a primary source file or the name of a precompiled GraRLS user program.

Program Parameters

Once the system has detected the name of a program all the following arguments will be interpreted as parameters to the Program routine for the application.

The parameters can be listed in the order in which they occur in the Program declaration or tagged with the parameter name - or any combination ( like with the call mechanism within the GraRLS language itself ).

When using the parameter name the name is prefixed with a "-" and followed by a space then the parameter value. It is not necessary to write the full parameter name, just enough the uniquely identify it.

Parameters with default expressions may be omitted.

C:\>grarls calendar.grs 2019 -hol "TESTDATA:/rlsdates.txt"

For Text parameters containing spaces the whole parameter should be placed in quotes. For enumerated types either the name or the alternate text may be used.