Extend the While language with (limited) string support.
string
“
character. There can be any number of any characters except newlines and ”
characters. Backslach is allowed inside string literals, but it has no special meaning (unlike in real programming languages).“”
, “apple”
, “123asdf>#&@\”
length
: takes a string and returns an integer, the number of characters in the stringconcat
: takes two strings and returns a string, the concatenation of the parametersTaks:
length
function just returns the stored number, and concat
becomes addition.