\ COMMENT.SEQ Allow multiple line comments in files. by Tom Zimmer : ?exec ( --- ) state @ abort" Can not be used while Compiling!" ; : ( --- ) loading @ 0= abort" COMMENT: can ONLY be used while loading" bl word 1+ " comment;" caps-comp 0= if ['] is run then [compile] \ ; : comment: ( --- ) \ ignore all lines between. [compile] \ ['] is run ; : <.comment:> ( --- ) loading @ 0= abort" .COMMENT: can ONLY be used while loading" bl word 1+ " comment;" caps-comp 0= if ['] 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. defer prevrun : <#if> ( --- ) \ ignore lines unless #else, or #endif begin bl word dup c@ 0= >r 1+ dup " #endif" caps-comp 0= over " #then" caps-comp 0= or swap " #else" caps-comp 0= or dup if @> prevrun is run >r prevrun r> then r> or until ; : #else ( --- ) ?exec @> run is prevrun \ Save previous value of RUN. ['] <#if> is run \ Ignore following lines <#if> ; immediate \ and rest of this line. : #if ( f1 --- ) \ ignore lines following if false ?exec 0= if @> run is prevrun \ Save previous value of RUN. ['] <#if> is run \ Ignore following lines <#if> \ and rest of this line. then ; immediate : #endif ; immediate \ just a noop for the #if TRUE case. : #then ; immediate \s ************* NOT LOADING BEYOND THIS LINE *********** \ Here is an example of how the interpreted compiler directives \ work cr cr .( press a T for true ) key bl or 116 = \ wait for a key #if .( TRUE) #else .( FALSE) #then .( always )