Deutsch   English   Français   Italiano  
<vq4rmt$1dv1v$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: sjack@dontemail.me (sjack)
Newsgroups: comp.lang.forth
Subject: Fetch string from comment
Date: Mon, 3 Mar 2025 18:17:01 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 54
Message-ID: <vq4rmt$1dv1v$1@dont-email.me>
Reply-To: sdwjack69@gmail.com
Injection-Date: Mon, 03 Mar 2025 19:17:01 +0100 (CET)
Injection-Info: dont-email.me; posting-host="0910bd363783b6b45ec4b088bc2b6ff3";
	logging-data="1506367"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18kxMPIurIrLmLjtHRq+5uQ"
User-Agent: tin/2.6.4-20240224 ("Banff") (Linux/6.8.0-54-generic (x86_64))
Cancel-Lock: sha1:ajREAzYXmzCs98+z8PLYkMR/50Q=
Bytes: 2091

                          String fetched from comment                           



Comment string

( This string is a simple comment)
( The comment can be enhanced to include parethises in the string)

( This string is an (enhanced) comment)


Accessing enhanced comments

A comment string, when interpreting, can be found in the 
input buffer.  It can be accessed and used if it's consumed
or moved before the end of line.


..( ( ccc<)> -- )  Print enhanced comment string

cr i. .( This string, an enhanced comment, is consumed (gets printed))
 --> This string, an enhanced comment, is consumed (gets printed)


s( ( ccc<)> -- s )  Save enhanced comment string

s( "MOO") s( The sound of a cow)
The above strings are saved in a ring buffer and 
return string references to be used soon.

cr i. ul( tell ) tab tell
 --> The sound of a cow "MOO"


,(  ( ccc<)> -- )  Compile enhanced comment string

here ,( This string with '"bar" (foo)' is compiled)
here om cr i. type
 --> This string with '"bar" (foo)' is compiled



Notes


i.          Print "-->"
ul(...)     Underline output of enclosed code
tell        COUNT TYPE
om          OVER MINUS

-fin- 
Note The underline didn't show in the post.