Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Most popular programming languages
#15
Gosh, is FORTH still around!?

I got into FORTH on the Radio Shack COCO computer.  The 6809 was a good CPU for FORTH.
I am even on the internet! (pg 25)  http://www.forth.org/fd/FD-V04N6.pdf

As always, somebody does a good job in Wikipedia:  https://en.wikipedia.org/wiki/Forth_(pro..._language)

Here is a code sample from page 180:

Exercize 2.15: Suppose the variables TEMP and HEATER-SWITCH have been declared
as part of an industrial simulation. TEMP holds a simulated temperature and
HEATERSWITCH holds a value that indicates whether a simulated heater is on or off.
Code a word STC (``simulate temperature change'') which has the following spec.

If the value held in HEATER-SWITCH is non zero, add 2 to the value held in TEMP,
otherwise subtract 1 from the value held in TEMP.

Solution 2.15:
Code: (Select All)
: STC \ -
  HEATER-SWITCH @
  IF  2  ELSE  -1  THEN
  TEMP +!
;
___________________________________________________________________________________
I am mostly grateful for the people who came before me.  Will the people after me be grateful for me?
Reply


Messages In This Thread
Most popular programming languages - by bert22306 - 08-25-2022, 09:23 PM
RE: Most popular programming languages - by JRace - 08-25-2022, 10:53 PM
RE: Most popular programming languages - by JRace - 08-26-2022, 05:00 AM
RE: Most popular programming languages - by Pete - 08-26-2022, 05:23 AM
RE: Most popular programming languages - by JRace - 08-26-2022, 06:11 AM
RE: Most popular programming languages - by dcromley - 08-31-2022, 03:05 PM
RE: Most popular programming languages - by JRace - 09-06-2022, 04:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  QB64PE programming challenge? auto-convert image to photoreal etch-a-sketch drawing madscijr 9 1,905 02-14-2025, 05:49 PM
Last Post: madscijr
  Steve's Programming Challenge: Weights and Measures SMcNeill 23 4,058 08-16-2024, 08:49 PM
Last Post: Pete
  For what it’s worth: Programming Clarity PhilOfPerth 11 2,308 07-27-2024, 03:15 PM
Last Post: bplus
  qbjs & qb64pe compatibility and equivalent for other languages like Python? madscijr 10 2,175 05-22-2024, 08:17 PM
Last Post: dbox
  Vintage programming BigPete 4 911 05-15-2024, 09:57 AM
Last Post: BigPete

Forum Jump:


Users browsing this thread: 1 Guest(s)