Text output and input

[ Back ]

Even if NaaLaa is meant for games, there may be circumstances where you need to output or input some values.

Sub routines

procedure write [expr[, expr ...]]
procedure wln [expr[, expr ...]]
function rln([max_chars])
function rln#([max_chars])
function rln$([max_chars]
procedure set caret x, y
procedure set justification left/right/center
procedure center [expr[, expr ...]]
procedure set decimals decimal_digits
procedure set decimals integer_digits, decimal_digits
function inkey()
function chr$(ascii_value)
function asc(a$)


procedure write [expr[, expr ...]]

Write a number of arbitrary expressions to current image.


procedure wln [expr[, expr ...]]

Write a number of arbitrary expressions to current image and add a line break.


function rln([max_chars])

Return an integer value from user (keyboard). If max_chars is submitted, the user can enter a maximum of max_chars characters.


function rln#([max_chars])

Return a floting point value from user (keyboard). If max_chars is submitted, the user can enter a maximum of max_chars characters.


function rln$([max_chars]

Return a text string from user (keyboard). If max_chars is submitted, the user can enter a maximum of max_chars characters.


procedure set caret x, y

Set top left position (pixels) for text output/input to x, y.


procedure set justification left/right/center

Set justification of text output to left, right or center.


procedure center [expr[, expr ...]]

Write a number of arbitrary expressions centered and add a line break. Setting justification to center and using wln gives the same result.


procedure set decimals decimal_digits

Set number of decimal digits for text output to decimal_digits.


procedure set decimals integer_digits, decimal_digits

Set minimum number of integer digits for text output to integer_digits and the number of decimal digits to decimal_digits.


function inkey()

Return ASCII value of the last key that was pressed.


function chr$(ascii_value)

Return a string containing the character represented by ascii_value.


function asc(a$)

Return ASCII value of the first character in a.


[ Back ]