Forth was created in 1970 by Charles H. Moore. He wanted to create a language that would allow more direct user and machine interaction. Therefore he created Forth. He designed the language on an IBM 1130, which he considered a third generation machine. But he considered his language a fourth generation language. Because of this he decided to name the language "Fourth," but unfortunately the IBM 1130 only allowed five character file names so it got shortened to "Forth."
Forth has one of the simplest syntaxes of any computer language. The syntax can be stated as: Forth code is a bunch of words with spaces between them. Each word is equivalent to a function or subroutine in a language like C. Functions are executed in the order they appear in the code. The following statement is an example that could appear in a Forth program: WAKE.UP EAT.BREAKFAST WORK EAT.DINNER PLAY SLEEP. The dots between WAKE and UP and the other words simply connect the two words to make one. Forth word names can have any combination of letters, numbers or punctuation.
|