Forth is a programming language created in 1970 by Charles H. Moore.
#85on PLDB | 54Years Old | 2kRepos |
Forth is an imperative stack-based computer programming language and environment originally designed by Charles "Chuck" Moore. Language features include structured programming, reflection (the ability to modify the program structure during program execution), concatenative programming (functions are composed with juxtaposition) and extensibility (the programmer can create new commands). Although not an acronym, the language's name is sometimes spelled with all capital letters as FORTH, following the customary usage during its earlier years. Read more on Wikipedia...
." Hello, world!" CR
.( Hello World)
' Hello world in Forth
." Hello World" CR
: HELLO ( -- )
." Hello Forth (fth)!" ;
HELLO
hex
create AKey 61 c, 8A c, 63 c, D2 c, FB c,
: test cr 0 DO rc4_byte . LOOP cr ;
AKey 5 rc4_init
2C F9 4C EE DC 5 test \ output should be: F1 38 29 C9 DE
Feature | Supported | Example | Token |
---|---|---|---|
Integers | ✓ | \ (\#|%|&|\-|\+)?[0-9]+ | |
Hexadecimals | ✓ | \ (\$[0-9A-F]+) | |
Print() Debugging | ✓ | . | |
Line Comments | ✓ | \ A comment | \ |
Postfix Notation | ✓ | \ Multiplies 25 and 10 and then adds 50 to result 25 10 * 50 + | |
Case Insensitive Identifiers | ✓ | ||
Comments | ✓ | ||
Semantic Indentation | X | ||
Case Sensitivity | X |