On 6/28/2020 12:06 PM, dwight via cctalk wrote:
Overloading is always a problem in Forth. It is so easy to do that one 
sometimes loses the context. I was writing an assembler for my 4004 project. I 
wanted to overload words like IF THEN for cleaner to read assembly so I didn't 
have a lot of branch labels. I like indenting to show beginning and ends of 
program flow control. I don't like doing things like IFa and THENa or such to 
show the context. I still wanted to write my macros in Forth and not in 
assembly, so I made a word Macro: to replace : so that it would automatically 
keep the context straight. It is a crutch but sometimes a well placed crutch 
can solve such context problems.
I now have my "CARRY IF ... THEN" in assembler and still can easily switch to Forth's 
"IF ... THEN" for making macro commands that need flow control and are for completely 
different context than the assembled code.
Dwight

A elseif would be easy to add I suspect to forth
I like the
"IF exep statements { EIF exep statments } {ELSE } ENDIF"
"WHILE exep statements REPEAT"
control structures because while { if {} else { if {} else .. }}
tends to be hard to find just what the last } belongs to if you have several screens of code.

Now days you need to have more code to handle windows and other I/O than pure problem solving as languages keep evolving.

Since I am working on a 1970's style computer ( blinking lights,
front panel,core memory, big rack with I/O devices) currently
being emulated in FPGA,I have been looking things from that era
rather than the modern stuff. It is sure hard to find a 16 or 32 bit cpu that has simple byte accessing from that era. That may
be one of the reasons the PDP 11 and/or Unix developed the growth
of more modern software and programming ideas.
Ben.






Reply via email to