Category:Forth
This programming language may be used to instruct a computer to perform a task.
Garbage collected: | No |
---|---|
Typing: | Untyped |
See Also: |
If you know Forth, please write code for some of the tasks not implemented in Forth.
Forth is a procedural, stack-oriented and reflective programming language without type checking which is also a concatenative programming language. Forth features both interactive execution of commands (making it suitable as a shell for systems that lack a more formal operating system) and the ability to compile sequences of commands for later execution; due to its ability to easily cross-compile a version of itself to other target architectures and because it does not need to rely on an underlying operating system, it is often used for embedded systems. Some Forth versions (especially early ones) compile concatenative threaded code, but many implementations today generate optimized machine code like other language compilers. While it has quite competitive performance on its own (comparable to Just-In-Time - JIT - compiled languages such as JavaScript, or those used on the Java Virtual Machine - JVM - such as Kotlin, or on DotNet such as C# or F#); however, if a particular application requires it, there is a closely integrated machine code Assembler that can be used to write the most time critical functions/"words" or to supply features not available in the standard language implementation.
Where not otherwise specified, examples conform to the 1994 ANSI Standard, also known as ANS Forth. Most Forth implementations now conform to this standard, often with system-specific extensions and convenience libraries. Some examples use words that are not in the standard, but which have become accepted as common practice since 1994. Standard words should be uppercase, but most Forth systems are case-insensitive.
Citations[edit]
- Wikipedia:Forth (programming language)
- Index to the ANS Forth words
- Wikipedia:Concatenative Programing language
Subcategories
This category has the following 3 subcategories, out of 3 total.
Pages in category "Forth"
The following 575 pages are in this category, out of 575 total.
2
A
- A+B
- Abbreviations, simple
- ABC problem
- ABC words
- Abelian sandpile model
- Abstract type
- Abundant, deficient and perfect number classifications
- Accumulator factory
- Ackermann function
- Add a variable to a class instance at runtime
- Additive primes
- Address of a variable
- AKS test for primes
- Align columns
- Amicable pairs
- Angle difference between two bearings
- Anonymous recursion
- Anti-primes
- Apply a callback to an array
- Approximate equality
- Arbitrary-precision integers (included)
- Arithmetic-geometric mean
- Arithmetic/Complex
- Arithmetic/Integer
- Arithmetic/Rational
- Array concatenation
- Array length
- Arrays
- Assertions
- Associative array/Creation
- Associative array/Iteration
- Averages/Arithmetic mean
- Averages/Median
- Averages/Pythagorean means
- Averages/Root mean square
- Averages/Simple moving average
B
- Babbage problem
- Balanced brackets
- Barnsley fern
- Base 16 numbers needing a to f
- Base64 decode data
- Base64 encode data
- Benford's law
- Binary digits
- Binary search
- Binary strings
- Bioinformatics/base count
- Bitmap
- Bitmap/Bresenham's line algorithm
- Bitmap/Flood fill
- Bitmap/Histogram
- Bitmap/Midpoint circle algorithm
- Bitmap/Read a PPM file
- Bitmap/Write a PPM file
- Bitwise IO
- Bitwise operations
- Boolean values
- Brazilian numbers
- Break OO privacy
- Bulls and cows
C
- Caesar cipher
- Calculating the value of e
- Calkin-Wilf sequence
- Call a foreign-language function
- Call a function
- Call a function in a shared library
- Call an object method
- Cantor set
- Case-sensitivity of identifiers
- Catalan numbers
- Catamorphism
- Character codes
- Check that file exists
- Chinese remainder theorem
- Circular primes
- Classes
- Closures/Value capture
- Collections
- Colour bars/Display
- Comma quibbling
- Command-line arguments
- Comments
- Compare a list of strings
- Compile-time calculation
- Compiler/AST interpreter
- Compiler/code generator
- Compiler/lexical analyzer
- Compiler/syntax analyzer
- Compiler/virtual machine interpreter
- Compound data type
- Concurrent computing
- Conditional structures
- Constrained genericity
- Continued fraction
- Continued fraction/Arithmetic/Construct from rational number
- Convert decimal number to rational
- Convert seconds to compound duration
- Conway's Game of Life
- Copy a string
- Copy stdin to stdout
- Count in factors
- Count in octal
- Count occurrences of a substring
- Count the coins
- Cousin primes
- CRC-32
- Create a file
- Create a two-dimensional array at runtime
- Create an HTML table
- Create an object at a given address
- CSV data manipulation
- CSV to HTML translation
- Cuban primes
- Cumulative standard deviation
- Currying
- Cycle detection
D
- Damm algorithm
- Date format
- Day of the week
- Define a primitive data type
- Delegates
- Delete a file
- Department numbers
- Detect division by zero
- Determinant and permanent
- Determine if a string is numeric
- Digital root
- Dinesman's multiple-dwelling problem
- Documentation
- Dot product
- Dragon curve
- Draw a clock
- Draw a pixel
- Draw a sphere
- Dutch national flag problem
- Dynamic variable names
E
- Echo server
- Egyptian division
- Emirp primes
- Empty program
- Empty string
- Enforced immutability
- Entropy
- Enumerations
- Environment variables
- Erdős-primes
- Esthetic numbers
- Ethiopian multiplication
- Euler method
- Euler's identity
- Euler's sum of powers conjecture
- Evaluate binomial coefficients
- Even or odd
- Evolutionary algorithm
- Exceptions
- Execute a system command
- Execute Brain****
- Execute HQ9+
- Exponentiation operator
- Extend your language
- Extra primes
- Extract file extension
- Extreme floating point values
F
- Factorial
- Factors of a Mersenne number
- Factors of an integer
- FASTA format
- Fibonacci n-step number sequences
- Fibonacci sequence
- File input/output
- File size
- Filter
- Find limit of recursion
- Find prime n such that reversed n is also prime
- Find prime numbers of the form n*n*n+2
- Find the missing permutation
- Find words which contains all the vowels
- Find words which contains more than 3 e vowels
- Find words whose first and last three letters are equal
- Find words with alternating vowels and consonants
- First perfect square in base n with n unique digits
- First-class functions
- FizzBuzz
- Flatten a list
- Flow-control structures
- Floyd's triangle
- Forest fire
- Formatted numeric output
- Forward difference
- Four bit adder
- Function composition
- Function definition
- Function frequency
G
H
- Hailstone sequence
- Hamming numbers
- Handle a signal
- Happy numbers
- Harmonic series
- Hash join
- Haversine formula
- Hello world/Graphical
- Hello world/Line printer
- Hello world/Newline omission
- Hello world/Standard error
- Hello world/Text
- Here document
- Hickerson series of almost integers
- Higher-order functions
- Hilbert curve
- History variables
- Hofstadter Q sequence
- Holidays related to Easter
- Horizontal sundial calculations
- Horner's rule for polynomial evaluation
- Host introspection
- Hostname
- HTTP
I
K
L
- Langton's ant
- Largest proper divisor of n
- Leap year
- Least common multiple
- Left factorials
- Letter frequency
- Levenshtein distance
- Linear congruential generator
- Literals/Floating point
- Literals/Integer
- Literals/String
- Logical operations
- Long primes
- Long year
- Look-and-say sequence
- Loop over multiple arrays simultaneously
- Loops/Break
- Loops/Continue
- Loops/Do-while
- Loops/Downward for
- Loops/For
- Loops/For with a specified step
- Loops/Foreach
- Loops/Infinite
- Loops/N plus one half
- Loops/Nested
- Loops/While
- Loops/Wrong ranges
- Lucas-Lehmer test
- Luhn test of credit card numbers
- LZW compression
M
- Magic 8-ball
- Man or boy test
- Mandelbrot set
- Map range
- Matrix multiplication
- Matrix transposition
- Maximum triangle path sum
- Maze generation
- MD5
- Memory allocation
- Memory layout of a data structure
- Menu
- Mertens function
- Metaprogramming
- Middle three digits
- Miller–Rabin primality test
- Minimum multiple of m where digital sum equals m
- Modular arithmetic
- Modular inverse
- Modulinos
- Monte Carlo methods
- Monty Hall problem
- Morse code
- Multi-dimensional array
- Multifactorial
- Multiline shebang
- Multiple distinct objects
- Multiplication tables
- Munchausen numbers
- Musical scale
- Mutual recursion
N
- N'th
- N-queens problem
- Named parameters
- Naming conventions
- Narcissist
- Narcissistic decimal number
- Native shebang
- Nice primes
- Non-decimal radices/Convert
- Non-decimal radices/Input
- Non-decimal radices/Output
- Nth root
- Null object
- Number reversal game
- Numbers divisible by their individual digits, but not by the product of their digits.
- Numbers with equal rises and falls
- Numerical integration
O
P
- Palindrome detection
- Pangram checker
- Parsing/RPN calculator algorithm
- Pascal's triangle
- Percentage difference between images
- Perceptron
- Perfect numbers
- Permutations by swapping
- Pernicious numbers
- Pig the dice game
- Plasma effect
- Playing cards
- Pointers and references
- Polymorphic copy
- Polymorphism
- Population count
- Power set
- Price fraction
- Primality by trial division
- Primality by Wilson's theorem
- Prime decomposition
- Primes whose sum of digits is 25
- Probabilistic choice
- Program name
- Program termination
- Proper divisors
- Pseudo-random numbers/Combined recursive generator MRG32k3a
- Pseudo-random numbers/Middle-square method
- Pseudo-random numbers/Splitmix64
- Pseudorandom number generator image
- Pythagorean triples
R
- Random number generator (device)
- Random numbers
- Range expansion
- Range extraction
- Read a configuration file
- Read a file line by line
- Read entire file
- Real constants and functions
- Recaman's sequence
- Regular expressions
- Remove duplicate elements
- Remove vowels from a string
- Rename a file
- Rep-string
- Repeat
- Repeat a string
- Respond to an unknown method call
- Return multiple values
- Reverse a string
- Reverse words in a string
- Rock-paper-scissors
- Roman numerals/Decode
- Roman numerals/Encode
- Roots of a quadratic function
- Roots of unity
- Rot-13
- RPG attributes generator
- Run-length encoding
- Runtime evaluation
- Runtime evaluation/In an environment
S
- Safe addition
- Sailors, coconuts and a monkey problem
- Search a list
- SEDOLs
- Self-describing numbers
- Semiprime
- Semordnilap
- Send an unknown method call
- Sequence of non-squares
- Sequence of primes by trial division
- Set
- Seven-sided dice from five-sided dice
- SHA-256
- Shell one-liner
- Short-circuit evaluation
- Show ASCII table
- Show the (decimal) value of a number of 1s appended with a 3, then squared
- Show the epoch
- Sierpinski arrowhead curve
- Sierpinski carpet
- Sierpinski triangle
- Sierpinski triangle/Graphical
- Sieve of Eratosthenes
- Simple database
- Simple windowed application
- Singleton
- Singly-linked list/Element definition
- Singly-linked list/Element insertion
- Singly-linked list/Traversal
- Sleep
- Smarandache prime-digital sequence
- Sockets
- Sort an integer array
- Sort three variables
- Sorting algorithms/Bubble sort
- Sorting Algorithms/Circle Sort
- Sorting algorithms/Cocktail sort
- Sorting algorithms/Comb sort
- Sorting algorithms/Gnome sort
- Sorting algorithms/Heapsort
- Sorting algorithms/Insertion sort
- Sorting algorithms/Merge sort
- Sorting algorithms/Quicksort
- Sorting algorithms/Selection sort
- Sorting algorithms/Shell sort
- Soundex
- Special characters
- Special divisors
- Special variables
- Spinning rod animation/Text
- Split a character string based on change of character
- Square but not cube
- Square-free integers
- Stack
- Stack traces
- Stair-climbing puzzle
- Start from a main routine
- Stem-and-leaf plot
- Stern-Brocot sequence
- Strange numbers
- Strange plus numbers
- Strange unique prime triplets
- String append
- String case
- String comparison
- String concatenation
- String interpolation (included)
- String length
- String matching
- String prepend
- Strip a set of characters from a string
- Strip comments from a string
- Strip control codes and extended characters from a string
- Strip whitespace from a string/Top and tail
- Subleq
- Substring
- Substring/Top and tail
- Sudoku
- Sum and product of an array
- Sum digits of an integer
- Sum multiples of 3 and 5
- Sum of a series
- Sum of divisors
- Sum of first n cubes
- Sum of squares
- Sum to 100
- Summarize primes
- Symmetric difference
- Synchronous concurrency
- System time
T
- Take notes on the command line
- Tamagotchi emulator
- Tau function
- Tau number
- Taxicab numbers
- Temperature conversion
- Terminal control/Clear the screen
- Terminal control/Coloured text
- Terminal control/Cursor movement
- Terminal control/Cursor positioning
- Terminal control/Dimensions
- Terminal control/Display an extended character
- Terminal control/Inverse video
- Terminal control/Preserve screen
- Terminal control/Ringing the terminal bell
- Tetris/Ansi94 Forth
- Text processing/1
- Text processing/Max licenses in use
- The Twelve Days of Christmas
- Time a function
- Tokenize a string
- Tokenize a string with escaping
- Top rank per group
- Topic variable
- Topological sort
- Totient function
- Towers of Hanoi
- Trabb Pardo–Knuth algorithm
- Tree traversal
- Trigonometric functions
- Triplet of three numbers
- Truncatable primes
- Twelve statements
- Two identical strings
- Two sum