![]() |
||
| Home | SwiftForth Archive | SwiftX Archive | |

Hi,
Copying the following text from my text editor to the clipboard
and pasting it in a SwiftForth window does NOT work. It seems that
embedded TABs are casusing problems, or maybe there is a CR/LF issue
(I'm using unix line endings).
-marcel
-- ---------------
0 VALUE ctab
: | ( n -- ) BL WORD CHAR+ C@ [char] 0 - CELLS ctab + HERE SWAP ! ; IMMEDIATE
: []CALL ( ix -- ) CELLS ctab + @ >R ;
: duff 8 /MOD ROT SWAP ( -- rem addr quot ) 0 ?DO 8 []CALL LOOP SWAP []CALL DROP ;
: }do HERE ctab ! ; IMMEDIATE
: do{ POSTPONE AHEAD
HERE TO ctab 9 CELLS ALLOT
POSTPONE THEN
POSTPONE duff
POSTPONE EXIT ; IMMEDIATE
\ -- test it --
VARIABLE port port OFF
: foo ( addr count -- )
do{
| 8 COUNT EMIT
| 7 COUNT EMIT
| 6 COUNT EMIT
| 5 COUNT EMIT
| 4 COUNT EMIT
| 3 COUNT EMIT
| 2 COUNT EMIT
| 1 COUNT EMIT
}do ;
S" Hello, world!" foo
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and
bug reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Sat Jun 14 2008 - 04:16:56 PDT
This archive was generated by hypermail 2.2.0 : Tue Dec 02 2008 - 03:04:44 PST