Sujet : Re: Fetch string from comment
De : sjack (at) *nospam* dontemail.me (sjack)
Groupes : comp.lang.forthDate : 04. Mar 2025, 22:02:52
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vq7pps$21q9f$2@dont-email.me>
References : 1 2
User-Agent : tin/2.6.4-20240224 ("Banff") (Linux/6.8.0-54-generic (x86_64))
dxf <
dxforth@gmail.com> wrote:
Not understanding where it fits in. Is this meant to be in lieu of
." ," S" etc ?
It could be if you were so incline. I'm not suggesting you should but
showing something possible.
The case for enhanced (nested) comment:
Traditionally the first line of an SCR is a comment seen by INDEX :
( FOO BAR BAT )
Traditionally certain words are inclosed in parentheses, i.e. (.") .
I would like to put such words in the comment seen by INDEX :
( FOO (PLUGH) BAR BAT )
Hence to do so the simple comment is enhanced to allow this.
Using enhanced comment for string operations:
If you have it then use it if it suits you.
The enhanced comment is more robust than the existing string operators
that you show in that any mix of printable characters can be contained
in the comment and string operators that base on it. No breaking up
text nor escaping characters needed (by the Forth):
.( The function("bar") char ) emit .( is to be used) \ standard, bah
.( The function("bar") is to be used) \ enhanced, ok
." Jack said " char " emit ." boo" char " emit . \ standard, bah
.( Jack said "boo") \ enhanced, ok
@( echo -e "Hello World\!") /sys \ enhanced, ok
-- me