Permalink
Browse files

add some comparison ops to the spec (no implementations or tests yet)

  • Loading branch information...
1 parent fe3f4c0 commit 44c0b79f7b65460cf3b7694550f787728ce72184 @cotto cotto committed May 28, 2012
Showing with 16 additions and 0 deletions.
  1. +12 −0 docs/pdds/draft/pdd32_m0.pod
  2. +4 −0 src/m0/m0.ops
@@ -256,6 +256,18 @@ Treat C<*$2> and C<*$3> as integer or floating-point values, divide C<*$1> by
C<*$3> and store the remainder in C<*$1>. Division by zero will make the the
M0 interpreter sad.
+=item * isgt_i - is $2 > $3 (integer)
+
+=item * isgt_n - is $2 > $3 (numeric)
+
+=item * isge_i - is $2 >= $3 (integer)
+
+=item * isge_n - is $2 >= $3 (numeric)
+
+Treat C<*$2> and C<*$3> as integer or floating-point values and compare them
+according to the name of the op. If the comparison is true, set C<*$1> to 1.
+Otherwise, set C<*$1> to 0.
+
=item * convert_n_i - convert to numeric from integer
Assume that C<*$2> is an integer value, convert it to a floating-point value
View
@@ -14,6 +14,10 @@ div_i
div_n
mod_i
mod_n
+isgt_i
+isgt_n
+isge_i
+isge_n
convert_i_n
convert_n_i
ashr

0 comments on commit 44c0b79

Please sign in to comment.