home *** CD-ROM | disk | FTP | other *** search
- \ COMMENT.SEQ Allow multiple line comments in files. by Tom Zimmer
-
- : <comment:> ( --- )
- bl word 1+ " comment;" caps-comp 0=
- if ['] <run> is run
- then [compile] \ ;
-
- : comment: ( --- ) \ ignore all lines between.
- [compile] \
- ['] <comment:> is run ;
-
- : <.comment:> ( --- )
- bl word 1+ " comment;" caps-comp 0=
- if ['] <run> is run
- else key? 0=
- if cr tib span @ 78 min type
- then
- then [compile] \ ;
-
- : .comment: ( --- ) \ ignore all lines between.
- [compile] \
- ['] <.comment:> is run ;
-
- comment: <- this marks the start line of a multi line comment.
-
- this is a comment line somewhere in the middle.
-
- comment; <- this marks the end line of a multi line comment.
-
- : <#if> ( --- )
- bl word 1+ " #endif" caps-comp 0=
- if ['] <run> is run
- then [compile] \ ;
-
- : #if ( --- ) \ ignore all lines between.
- [compile] \
- if exit
- then ['] <#if> is run ;
-
- : #endif ; \ just a noop for the #if TRUE case.
-
- comment:
-
- true #if True flag passed, this comment needs no preceeding \
- cr .( This statment printed due to TRUE flag in #IF statment.)
- #endif
-
- false #if
- .( This statment NOT printed due to FALSE flag in #IF statment.)
- #endif
-
- comment;
-