Messages on the Status Line


The Status Line is the line at the bottom of the DADiSP application window where scalar results of calculations (e.g., MAX(W1)) and messages such as "Calculating Window, please wait...." are displayed. When you display a message on the Status Line, you will need to pause the command file to allow the user to read the message. Commands to pause the command file include: @PAUSE, @SUSPEND, @SUSPEND_NOPASS, @WAIT, and @WAITKEY.


During an interactive session, you may use the ECHO command to display text or results of calculations on the Status Line. Two special command file functions may be used during a command file, in addition to the ECHO command, to display text on the Status Line: @MESSAGE and @HIGHLIGHT_MESSAGE. The command @MESSAGE("message text") displays the message text centered on the Status Line, while the command @HIGHLIGHT_MESSAGE("message text") displays the message text in reverse video, centered on the Status Line.


Both @MESSAGE and @HIGHLIGHT_MESSAGE accept a fixed string of text. That is, you cannot pass a statement to these commands and expect it to be evaluated before being displayed. The ECHO command, however, can accept statements to be evaluated before display on the Status Line.


The following command file demonstrates the Status Line message options:


! StatLine.dsp

@MESSAGE("I do not know how many Windows there are in this Worksheet.")


@HIGHLIGHT_MESSAGE("I wish I knew the number of Windows in this Worksheet.")


ECHO(STRCAT("There are ",STRNUM(NUMWIN)," Windows in this Worksheet.")) @CR




The following is not a valid command file statement:


@MESSAGE(STRCAT("There are ",STRNUM(NUMWIN)," Windows in this Worksheet"))


Status Line messages remain displayed until something overwrites the Status Line. They are also useful for 'hiding' messages you donít want user to notice because they may be distracting. For example, if your command file uses SPLREAD or MACREAD to read in some functions or macros, you may not want the user to see the confirmation message which SPLREAD and MACREAD display when they terminate, which can be something like "64 Macros read from file macrosmymacros.mac". So, follow the SPLREAD or MACREAD statement with a message:


SPLREAD("SPLormula.spl") @CR



Note that the length of the status line is dependent upon the width of the application window. If the user resizes the application window so small that a long message will not fit, you may want to consider other message options.