Petit Computer Wiki
Advertisement

PNLSTR is a command used to print text to the lower screen in Petit Computer.

Syntax[]

PNLSTR x,y,text$[,color]

x, y, and color are all rounded down to the nearest integer.

Purpose[]

PNLSTR is used to print text to the lower screen's text screen. Depending on the setting of PNLTYPE, this will either be displayed over the keyboard background layer or above the rest of the usual screen contents. This command functions similarly to the following code (except on the lower screen):

LOCATE x,y
COLOR color
PRINT LEFT$(text$,32-x);

If the color is not specified, then PNLSTR will use the same color as set by COLOR.

Notice that there are a few differences from PRINT. This command requires the coordinates to always be specified, and allows the color to be optionally controlled, all within the same command. Additionally, PNLSTR does not wrap text - if a string would go off the edge of the screen, it is simply cut off. There is also no way for PNLSTR to scroll the text console.

Coordinates outside of the screen can be specified - however, nothing will be printed if this is the case.

Errors[]

Action Error
Less than three arguments are provided Missing operand
More than four arguments are provided Syntax error
A string is passed where a numeric argument is expected Type Mismatch
A number is passed where a string argument is expected Type Mismatch
Advertisement