Reputation: 38248
red accepts instruction written on multiple lines which is good. But is there a way to use separator between instructions ?
I tried to use ";" but it doesn't work, is there any other symbol available ?
Upvotes: 2
Views: 308
Reputation: 3199
red accepts instruction written on multiple lines which is good. But is there a way to use separator between instructions ?
There are no "instructions" in Red, it's all data (blocks, words, integers, strings, etc...). Moreover, "lines" are irrevelant in Red once your script is load
-ed in memory, it becomes a native data structure that you can interact with, like any other data structure. New-line characters are converted to so-called "line markers" that are just cosmetic, they have no specific meaning in the language. They separate values like any other accepted whitespace character.
If you really need to make a long expression easier to read, you can use "line markers" or parens to isolate nested expressions.
Upvotes: 0