Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.forth    |    Forth programmers eat a lot of Bratwurst    |    117,927 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 116,694 of 117,927    |
|    Hans Bezemer to dxf    |
|    Re: portable or not? Volatile strings    |
|    21 Aug 24 19:12:36    |
      From: the.beez.speaks@gmail.com              On 13-08-2024 06:07, dxf wrote:       > On 13/08/2024 5:34 am, albert@spenarnc.xs4all.nl wrote:       >> ...       >> In my book the code should be       >>       >> " "       >> "###### "       >> " ## "       >> " "       >> DEF-BRICK BRICK1       >>       >> Instead of       >>       >> DEF-BRICK BRICK1 S" "       >> S" ###### "       >> S" ## "       >> S" "       >>       >> The code (untested) could be       >> : DEF-BRICK CREATE       >> 2>R 2>R 2>R 2>R       >> 2R> ,, 2R> ,, 2R> ,, 2R> ,,       >> DOES> ... ;       >       > OTOH it's no less difficult to write...       >       > : M" [CHAR] " PARSE HERE OVER ALLOT SWAP MOVE ;       >       > : DEF-BRICK CREATE DOES> ROT 4 * ROT + 2* CHARS + ;       >       > DEF-BRICK BRICK1 M" "       > M" ###### "       > M" ## "       > M" "       >              In 4tH, the easiest solution would be:              : BRICK@ ROT + @C SWAP 2* CHARS + ;              CREATE BRICK1        ," "        ," ###### "        ," ## "        ," "       DOES> BRICK@ ;              I could throw a bit of preprocessor magic in the mix, so it would       resemble your solution even closer, but I guess you can do without ;-)              Hans Bezemer              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca