In R:BASE versions 6.5++ and lower, there are other prompts that you will run across from time to time when using R:BASE.
Prompt |
Description |
Exit Method |
R> |
This is the standard Command Entry prompt. (Exiting this will exit R:BASE) |
EXIT or QUIT |
B> |
Indicates that you have entered a BREAK command but have not reached the end of the looping structure (such as an ENDSW). |
In most cases ENDSW. The [Esc] key may work. |
I> |
This prompt indicates that you are currently within an IF or ELSE body block for conditions that are not met. |
ENDIF |
L> |
This indicates that you are in a LOAD table status. |
END |
S> |
This indicates that you are inside a SWITCH or CASE command block for the non-matching CASEs for a SWITCH but that you have not yet matched a case. Once you have matched a case this is replaced by the B> Prompt. |
ENDSW |
W> |
This indicates that you are inside of a WHILE loop command block. |
ENDWH |
Examples
The following examples would be typed at the R> Prompt.
The following example shows the I> Prompt.
R> IF 'A' = 'B' THEN
I> WRITE 'TRUE' *(The I> Prompt indicates this is not
being processed and we are waiting
for a control structure such as an
ELSE or ENDIF)
I> ELSE
R> WRITE 'FALSE' *(The R> Prompt indicates commands
are being processed. In this case,
because A does not equal B. What follows
on the next line is the output from
the WRITE command.
FALSE
R> ENDIF
The following example illustrates the S> and B> Prompts.
R> SET VAR vX INT = 1
R> SWITCH (.vX)
S> CASE 0 *(As with the I> Prompt the S>
Prompt indicates a CASE has not
matched the value of the vX
variable.)
S> WRITE 'I am zero'
S> BREAK
S> CASE 1
R> WRITE 'I am one' *(The prompt changes to "R>"
because this is the "active" case. What
follows on the next line is the output from the
WRITE command.)
I am one
R> BREAK
B> CASE 2 *(Here is the "B>" where the SWITCH is
looking for the "ENDSW" command. This
happens because the MATCH has been
found and all further commands
should be ignored.)
B> WRITE 'I am two'
B> BREAK
B> ENDSW
R> *(Here we have exited the SWITCH structure.)
The following example illustrates the W> Prompt. Once the ENDWH command is entered many lines of text will be written to the screen. These lines will terminate after one minute.
R> SET VAR vLater TIME = (ADDMIN(.#TIME,1))
R> WHILE #TIME < .vLater THEN
W> WRITE 'Not Yet: ' .#TIME
W> ENDWH
The following commands will illustrate the L> Prompt. They also create a new database named TestLPrm which can be deleted.
R> CREATE SCHEMA AUTH TestLPrm
R> CREATE TABLE TestLPrm (TestCol INT)
R> LOAD TestLPrm
L> 1 *(The L> Prompt indicates that R:BASE
is waiting for data to be entered.
L> 2
L> 3
L> END
R>