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, a procedural, stack-oriented and reflective programming language without type checking, 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. Some Forth versions (especially early ones) compile threaded code, but many implementations today generate optimized machine code like other language compilers.
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]
Subcategories
This category has the following 3 subcategories, out of 3 total.
Pages in category "Forth"
The following 491 pages are in this category, out of 491 total.
2
A
- A+B
- Abbreviations, simple
- ABC problem
- Abelian sandpile model
- Abstract type
- Abundant, deficient and perfect number classifications
- Accumulator factory
- Ackermann function
- Add a variable to a class instance at runtime
- Address of a variable
- AKS test for primes
- Align columns
- Anonymous recursion
- Anti-primes
- Apply a callback to an array
- 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
- 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
- Break OO privacy
- Bulls and cows
C
- Caesar cipher
- Calculating the value of e
- Call a foreign-language function
- Call a function
- Call an object method
- Cantor set
- Case-sensitivity of identifiers
- Catalan numbers
- Catamorphism
- Character codes
- Check that file exists
- Chinese remainder theorem
- 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
- 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
- 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
- Dutch national flag problem
- Dynamic variable names
E
- Echo server
- Egyptian division
- Emirp primes
- Empty program
- Empty string
- Enforced immutability
- Entropy
- Enumerations
- Environment variables
- Ethiopian multiplication
- Euler method
- 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
- Extract file extension
- Extreme floating point values
F
- Factorial
- Factors of a Mersenne number
- Factors of an integer
- Fibonacci n-step number sequences
- Fibonacci sequence
- File input/output
- File size
- Filter
- Find limit of recursion
- Find the missing permutation
- 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
- Hash join
- Haversine formula
- Hello world/Graphical
- Hello world/Line printer
- Hello world/Newline omission
- Hello world/Standard error
- Hello world/Text
- Here document
- Higher-order functions
- Hilbert curve
- History variables
- Holidays related to Easter
- Horizontal sundial calculations
- Horner's rule for polynomial evaluation
- Host introspection
- Hostname
- HTTP
I
K
L
- Langton's ant
- Leap year
- Least common multiple
- Left factorials
- Letter frequency
- Levenshtein distance
- Linear congruential generator
- Literals/Floating point
- Literals/Integer
- Literals/String
- Logical operations
- 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
- Metaprogramming
- Middle three digits
- Miller–Rabin primality test
- Modular inverse
- Modulinos
- Monte Carlo methods
- Monty Hall problem
- Morse code
- Multifactorial
- Multiline shebang
- Multiple distinct objects
- Multiplication tables
- Munchausen numbers
- Musical scale
- Mutual recursion
N
O
P
- Palindrome detection
- Pangram checker
- Pascal's triangle
- Percentage difference between images
- Perceptron
- Perfect numbers
- Permutations by swapping
- Pig the dice game
- 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
- Probabilistic choice
- Program name
- Program termination
- 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
- Regular expressions
- Remove duplicate elements
- 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
- 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
- Shell one-liner
- Short-circuit evaluation
- Show ASCII table
- Show the epoch
- 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
- 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 variables
- Spinning rod animation/Text
- Split a character string based on change of character
- Stack
- Stack traces
- Stair-climbing puzzle
- Start from a main routine
- Stem-and-leaf plot
- Stern-Brocot sequence
- String append
- String case
- String comparison
- String concatenation
- 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 squares
- Sum to 100
- Symmetric difference
- Synchronous concurrency
- System time
T
- Take notes on the command line
- Tamagotchi emulator
- 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/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
- Top rank per group
- Topic variable
- Topological sort
- Towers of Hanoi
- Trabb Pardo–Knuth algorithm
- Tree traversal
- Trigonometric functions
- Twelve statements
- Two sum