Page 2 of 2
Re: New edition of "Programming Forth" by Pelc (July 2016)
Posted: Fri Jan 06, 2017 11:18 pm
by dwight
To take things in a different direction, in Forth, I often put 3 or 4
Forth words on a single line.
I don't do it to compact the code but to make the code more readable.
Often strings of Forth words are almost sentences.
How do others feel about this?
I've gotten away from the one words, followed by a usually useless comment.
Dwight
Re: New edition of "Programming Forth" by Pelc (July 2016)
Posted: Sat Jan 07, 2017 12:02 am
by GARTHWILSON
To take things in a different direction, in Forth, I often put 3 or 4
Forth words on a single line.
I don't do it to compact the code but to make the code more readable.
Visual factoring is very valuable.
Often strings of Forth words are almost sentences.
I've had some that truly
are sentences, like
where
TURN is a flag variable,
ON sets it to true,
#4 is a constant's name and it puts the LED number on the stack, and
LED does the job. English does not operate in RPN like Korean does though, so in most cases the code won't sound very English-like, which is fine with me. It can still be Forth sentences.
Re: New edition of "Programming Forth" by Pelc (July 2016)
Posted: Sat Jan 07, 2017 9:29 am
by scotws
Does it just overwrite your comments?
No, it doesn't touch them - I put that in by hand so people here don't have to figure out what
lda.di does. Seemed like the polite thing to do until you've all switched to Typist's Notation as well

.
Re: New edition of "Programming Forth" by Pelc (July 2016)
Posted: Mon Jan 23, 2017 1:41 pm
by Bregalad
Looks great, is there a way to get this book in Switzerland ?