Comments
Loading Dream Comments...
You must be logged in to write a comment - Log In
Here are some more ::SHE+ILA:: opcodes, typically for conditional comparisons and array operations :
A .eq. B ::> X // TRUE if A is equal to B;
A .lt. B ::> X // TRUE if A is less than B;
Similarly for .le. (less or equal), .gt. (greater than), .ge. (greater or equal), .ne. (not equal to). They are identical to the Fortran comparison operators. They are used rather than < , = , > etc. because < , << , > , >> are used in FBI (Fundamental Buffer Interface);
A .ro. B ::> X // A repeats of B are produced as a vector, as in APL;
.io. A ::> X // a vector of integers from 1 to A is produced, as in APL;
.rt. A ::> X // vector A is reversed, as in APL;
A .rt. B ::> X // vector B is rotated by A positions, as in APL;
"String" ::> X // X is set to the specified string;
`A ::> X // X is set to the literal character code A;
`^A ::> X // X is set to control-A (and so on) for example ^M^J is CRLF;
$0A ::> X // Hexadecimal constant (e.g. decimal 10 is hexadecimal $0A);
QUIT // Like "break" in C++ it exits loops to the next level, also can be coded as .quit.;
TRUE // The Boolean value "true", also can be coded as .true.;
FALSE // The Boolean value FALSE, also can be coded as .false.;
.pi. // The math constant used a lot in trig formulas, approx 3.141592653;
.i. // The complex value .sqrt. (-1);
.j. // The quaternion value being another .sqrt. (-1);
.k. // Ditto, .i. * .j. == .k. :) ;
.sqrt. A ::> X // Square root;
.log. A ::> X // Natural log (also codable as .ln.)
.exp. A ::> X // Quaternion exponential (whatever);
.abs. A ::> X // Absolute (positive) value, e.g. .abs. (3+.i.*4) is 5 (by Pythagoras);
A .mod. B ::> X // The remainder of A .div. B;
.rand. A ::> X // A random number in the range 1 to A inclusive;
.fsc. ::> X // The reciprocal fine structure constant (ratio between strong and electromagnetic forces), approximately .pi. * (4 * .pi. * .pi. + .pi + 1);
.re. A ::> X // Real component of a complex or quaternion;
.im. A ::> X // Imaginary component of a complex or quaternion value;
.sin. A ::> X // Sine trig function (radians);
.cos. A ::>X // Cosine trig function (radians);
.atan. A ::> X // Arctangent (radians);