functionScrollText

Writes the k last messages of a payload on a large text screen, one line each: under the last written line, then scrolling up once the screen is full

Inputs

TypeNameDefaultDescription
Integer[:]textInASCII codes shown, line after line: line i, column j at index (i - 1)*nCols + j
IntegerfilledInNumber of lines written so far (at most nLines)
StringpayloadMessages separated by line feeds
IntegerkNumber of new messages, the last ones of payload
IntegernLines
IntegernCols

Outputs

TypeNameDefaultDescription
Integer[size(textIn, 1)]texttextIn
IntegerfilledfilledIn