Multi-line Comment

61 views
Skip to first unread message

Craig Lindley

unread,
Oct 10, 2018, 3:15:22 PM10/10/18
to pforthdev
Does pForth have a way of handling multi-line comments beside commenting out each line?

philburk

unread,
Apr 22, 2023, 7:27:59 PM4/22/23
to pforthdev
I could add this. Is there a standard Forth way of doing this?
How about this?

(((
This is a
multi
line comment in pForth!
)))

Helmut Eller

unread,
Apr 23, 2023, 4:57:49 AM4/23/23
to philburk, pforthdev
On Sat, Apr 22 2023, philburk wrote:

> I could add this. Is there a standard Forth way of doing this?
> How about this?
>
> (((
> This is a
> multi
> line comment in pForth!
> )))

I think the standard way is a single paren, at least for Forths that
support the file word set. See
https://forth-standard.org/standard/file/p.

Helmut

Phil Burk

unread,
Apr 23, 2023, 10:36:08 AM4/23/23
to Helmut Eller, philburk, pforthdev
Sounds great. I tried "(" across multiple lines in pForth and it failed.
I will just extend the definition of "(" to support multiple lines.

See https://github.com/philburk/pforth/issues/151

Phil Burk


Reply all
Reply to author
Forward
0 new messages