user310291
user310291

Reputation: 38248

is there an optional end-instruction in rebol/red like ";" in javascript

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

Answers (2)

DocKimbel
DocKimbel

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

endo64
endo64

Reputation: 2307

Nope, there is no such symbol and it should not be necessary.

Upvotes: 1

Related Questions