Words

This page lists the built-in words of omega by group (there are a shitload, you don't need to memorise them), using the same group names as help. Inside the system, 'word help shows you the stack effect and an example for any of them.

Stack

The stack words are dup drop swap over rot nip depth empty.

Math and logic

The arithmetic and bitwise words are + - * / mod ^ neg abs min max & | xor ~ << >>. The comparisons are = < > <= >=, and the logical words are and or not.

The same arithmetic words also accept ordinals and cardinals, and Ordinals and cardinals explains how.

Flow

This is where loops and conditions live.

The flow words are do if when unless times for while each map filter eval trace try.

cond [ yes ] [ no ] if
cond [ yes ] when
n [ body ] times
a b [ body ] for          i from a to b-1 on the stack
[ cond ] [ body ] while
list [ f ] each / map / filter

try

try takes a quote and leaves 1 if it ran and 0 if it failed, and it prints the error. Anything the quote pushed before it failed stays on the stack.

Lists

The list words are list range append cat len at first last rest has spread. They work on quotes, since a quote is a list.

Text

The text words are str hex chr slice pad find split >num upper.

Input and output

The words for reading and writing are . say write emit nl color key key? waitkey ask.

Names

The words that manage definitions are : -> get forget see words edit defined? >sym src, and the rules for them are in omega.

Machine words

For the words that reach memory, ports, PCI devices, time and the screen, check Machine. For tabs, saving and root, check World and Root.

See also