String type
The string type is used to represent text. It contains the character sequences. Unlike strings in other dialects of Pascal, strings in MIDletPascal are not equal to arrays of characters. MIDletPascal has few procedures and functions to work on strings. The following operators can be used on strings:
Look at the example code:
var text: string;
begin
text := 'It is now ' + getHour(getCurrentTime) + ' o''clock ';
drawText(text, 0, 0);
repaint;
delay(2000);
end.
To include the single-quote sign inside the string, write it twice so that MIDletPascal does not confuse it with the string-ending quote.