Skip to content

Commit

Permalink
code-ify op variants
Browse files Browse the repository at this point in the history
masak++
  • Loading branch information
coke committed Sep 17, 2013
1 parent 97f9b57 commit 2daeb9a
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions docs/ops.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,70 +16,70 @@ variants (e.g. mul_i, mul_n) together with a single description.
# Arithmetic Opcodes

## abs
* abs_i(int $i)
* abs_n(num $n)
* abs_I(Int $i)
* `abs_i(int $i)`
* `abs_n(num $n)`
* `abs_I(Int $i)`

Return the absolute value of a number.

## add
* add_i(int $l, int $r)
* add_n(num $l, num $r)
* add_I(Int $l, Int $r)
* `add_i(int $l, int $r)`
* `add_n(num $l, num $r)`
* `add_I(Int $l, Int $r)`

Add two numbers together, returning the result.

## div
* div_i(int $l, int $r)
* div_n(num $l, num $r)
* div_I(Int $l, Int $r)
* `div_i(int $l, int $r)`
* `div_n(num $l, num $r)`
* `div_I(Int $l, Int $r)`

Divide $l by $r, returning the result.

## gcd
* gcd_i(int $l, int $r)
* gcd_I(Int $l, Int $r)
* `gcd_i(int $l, int $r)`
* `gcd_I(Int $l, Int $r)`

Return the greatest common multiple of two numbers.

## lcm
* lcm_i(int $l, int $r)
* lcm_I(Int $l, Int $r)
* `lcm_i(int $l, int $r)`
* `lcm_I(Int $l, Int $r)`

Return the lowest common multiple of two numbers.

## mod
* mod_i(int $l, int $r)
* mod_n(num $l, num $r)
* mod_I(Int $l, Int $r)
* `mod_i(int $l, int $r)`
* `mod_n(num $l, num $r)`
* `mod_I(Int $l, Int $r)`

Return the modulus of $l by $r.

## mul
* mul_i(int $l, int $r)
* mul_n(num $l, num $r)
* mul_I(Int $l, Int $r)
* `mul_i(int $l, int $r)`
* `mul_n(num $l, num $r)`
* `mul_I(Int $l, Int $r)`

Multiple two numbers, returning the result.

## neg
* neg_i(int $i)
* neg_n(num $n)
* neg_I(Int $i)
* `neg_i(int $i)`
* `neg_n(num $n)`
* `neg_I(Int $i)`

Return the negative of a number.

## sub
* sub_i(int $l, int $r)
* sub_n(num $l, num $r)
* sub_I(Int $l, Int $r)
* `sub_i(int $l, int $r)`
* `sub_n(num $l, num $r)`
* `sub_I(Int $l, Int $r)`

Subtract $r from $l, returning the result.

# String Opcodes

## radix
* radix_I(int $radix, String $str, int $pos, int $flags)
* `radix_I(int $radix, String $str, int $pos, int $flags)`

Convert string $str into a number starting at offset $pos and using radix $radix.
The result of the conversion returns an array with
Expand All @@ -101,21 +101,21 @@ The $flags is a bitmask that modifies the parse and/or result:
# Miscellaneous Opcodes

## getenvhash
* getenvhash()
* `getenvhash()`

Returns a hash containing the environment variables.
Changing the hash doesn't affect the environment variables

## savecapture
* savecapture()
* `savecapture()`

Gets hold of the argument capture passed to the current block.
Commits to doing enough copying that the list is valid any amount of time.
See usecapture for a version of the op that doesn't promise that.
Used by the multi-dispatcher.

## usecapture
* usecapture()
* `usecapture()`

Gets hold of the argument capture passed to the current block.
(a future usecapture may invalidate it)
Expand Down

0 comments on commit 2daeb9a

Please sign in to comment.