TEdcAL
Jump to navigation
Jump to search
TEdcAL is supposed to be a cross between INTERCAL and dc (the UNIX desk calculator).
Commands (any one with no description is same as dc; commands are based on GNU dc):
- _0123456789ABCDEF.
- []
- + - Can also concatenate strings.
- -
- *
- /
- %
- ~
- ^
- |
- & - Does unary AND (like INTERCAL, but arbitrary precision).
- ? - Does unary XOR (like INTERCAL, but arbitrary precision).
- $ - Performs interleave bits operation of INTERCAL, but arbitrary precision. (You can use negative numbers too, and something like 0 _1$ should result in negative one third.)
- :r
- ;r
- " - Follow by something resulting in one number on the stack and then another ". This is a label for a subroutine code or a target of G and g commands. (Note that labels can change simply by changing the input radix!)
- ! - Prefixes an abstained command, which causes the command to do nothing. However, if the next command is < or > or = then it does the reverse comparison like dc does, which means that abstaining it can change it in this way.
- <
- >
- =
- ' - Performs select of bits (like INTERCAL, but arbitrary precision).
- , - Performs unselect of bits, like reverse of ' and all inserted bits are zeroed.
- @ - Receive one byte of input.
- (r - Causes register to be ignored. Any further assignments are ignored and the S command saves the ignore state on its stack and L retrieves its ignore state, although S when assigning a value while ignored, will just push the same value it already has instead of the new one.
- )r - Causes register to be not ignored anymore, if it is currently ignored.
- G - Pops a number, find the corresponding label (in the way x does, but searches all valid levels instead of only the innermost valid one) and marks as abstained command.
- H - Converts an entire string to a number, such that output using P command outputs this string. If value on stack is a number, then instead converts to a string, in the same way.
- I
- K
- Lr
- O
- P
- Q
- R - Make number output so user can read it. Output radix can be zero, causing roman numerals.
- Sr
- Uab - Swap the meaning of the command a with b. (It is even permitted to change the meaning of digits with other digits or with commands other than digits.)
- V - Does unary OR (like INTERCAL, but arbitrary precision).
- W - Receive number input, so user can write a number into the computer. Input radix can be zero, requiring roman numerals.
- X
- Yc - Adds ! prefix everywhere in current level and levels more outer on the call stack to all command that is c.
- Z
- a
- b - Takes a number and forgets that many entries from the call stack, while still executing the current block.
- c
- d
- g - Pops a number, find the corresponding label (in the way x does) and removes mark as abstained, if any (removes all of them if they have been multiply abstained).
- i
- k
- lr
- o
- q
- r
- sr
- x - If the argument is a number, uses a duplicate of the string the innermost currently executing block containing such a label (labels inside of [] blocks are ignored), with everything before that label deleted; if more than one such label exists, forks into multiple threads if all of those labels are at the same level of the call stack, and if none exists, it is an error. Otherwise it is like dc.
- yc - Does reverse of Y.
- z