Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Forth (programming language)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Stack-based programming language}} {{Redirect|FORTH||Forth (disambiguation)}} {{Infobox programming language | name = Forth | paradigm = [[Concatenative programming language|concatenative]] ([[Stack-oriented programming|stack-based]]), [[Procedural programming|procedural]], [[Reflective programming|reflective]] | year = {{start date and age|1970}} | designer = [[Charles H. Moore]] | typing = Typeless | implementations = SwiftForth (Forth, Inc.)<br/>[[Gforth]] (GNU Project)<br/>VFX Forth (MicroProcessor Engineering) | influenced = [[Bitcoin#Transactions|Bitcoin Script]], [[Factor (programming language)|Factor]], [[Joy (programming language)|Joy]], [[RPL (programming language)|RPL]], [[Rebol]], [[STOIC]] | file_ext = .fs, .fth, .4th, .f, .forth{{cn|date=April 2022}} | website = {{URL|https://forth-standard.org}} }} '''Forth''' is a [[Stack-oriented programming|stack-oriented]] [[programming language]] and interactive [[integrated development environment]] designed by [[Charles H. Moore|Charles H. "Chuck" Moore]] and first used by other programmers in 1970. Although not an [[acronym]], the language's name in its early years was often spelled in [[all caps|all capital letters]] as ''FORTH''. The FORTH-79 and FORTH-83 implementations, which were not written by Moore, became ''[[de facto]]'' standards, and an official [[technical standard]] of the language was published in 1994 as ANS Forth. A wide range of Forth derivatives existed before and after ANS Forth. The [[free and open-source software]] [[Gforth]] implementation is actively maintained, as are several [[Commercial software|commercially]] supported systems. Forth typically combines a compiler with an integrated command shell,{{efn|There are exceptions, such as Ulrich Hoffmann's preForth [http://www.euroforth.org/ef18/papers/hoffmann-slides.pdf][http://www.euroforth.org/ef18/papers/hoffmann.pdf] and Tom Zimmer's TCOM}} where the user interacts via [[subroutine]]s called ''words''. Words can be defined, tested, redefined, and debugged without recompiling or restarting the whole program. All syntactic elements, including variables, operators, and control flow, are defined as words. A [[stack (abstract data type)|stack]] is used to pass parameters between words, leading to a [[Reverse Polish notation]] style. For much of Forth's existence, the standard technique was to compile to [[threaded code]], which can be interpreted faster than [[bytecode]]. One of the early benefits of Forth was size: an entire development environment—including compiler, editor, and user programs—could fit in memory on an 8-bit or similarly limited system. No longer constrained by space, there are modern implementations that generate [[Optimizing compiler|optimized]] [[machine code]] like other language compilers. The relative simplicity of creating a basic Forth system has led to many personal and proprietary variants, such as the custom Forth used to implement the bestselling 1986 video game ''[[Starflight]]'' from [[Electronic Arts]].<ref name="maher">{{cite web|last1=Maher|first1=Jimmy|title=Starflight|url=https://www.filfre.net/2014/10/starflight/|website=The Digital Antiquarian|date=October 28, 2014|access-date=April 29, 2023}}</ref> Forth is used in the [[Open Firmware]] [[boot loader]], in [[spaceflight]] applications<ref name="oSWRm">[https://web.archive.org/web/20101024223709/http://forth.gsfc.nasa.gov/ NASA applications of Forth] (original NASA server no longer running, copy from archive.org)</ref> such as the [[Philae (spacecraft)|''Philae'' spacecraft]],<ref name="zYmBe">{{cite web|title=Intersil's RTX processors and Forth software controlled the successful Philae landing|url=https://mpeforth.com/press/MPE_PR_From_Telescope_to_Comet_2014_11_13.pdf |access-date=April 29, 2023|website=MicroProcessor Engineering Limited|date=October 13, 2014}}</ref><ref name="sgEMh">{{cite web|title=Here comes Philae! Powered by an RTX2010|url=https://www.cpushack.com/2014/11/12/here-comes-philae-powered-by-an-rtx2010/|website=The CPU Shack Museum|date=October 12, 2014|access-date=April 29, 2023}}</ref> and in other embedded systems which involve interaction with hardware. Moore developed a series of microprocessors for executing compiled Forth-like code directly and experimented with smaller languages based on Forth concepts, including cmForth and [[colorForth]]. Most of these languages were designed to support Moore's own projects, such as chip design.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)