Index
| Manual
Binary operator
@An indexer suitable to be used on structures having elements identified with one index, such as arrays and strings. A matrix requires two indices to access an element (a row and column number), and can therefore not be used with this operator. Example2@"abc"; /* returns "b". */ 3@{3, 2, 1}; /* returns 1. */ See also
No-op
Postfix unary operator
Binary operator
^Raises the left argument to the power of the right argument.
Function
[Creates a matrix. Example[32, 42]; /* Creates a 2x1 matrix. */ [[33], [41]]; /* Creates a 1x2 matrix. */ [[1, 2], [3, 4]]; /* Creates a 2x2 matrix. */
Value
Prefix unary operator
Prefix unary operator
Function
Function
Function
forThe for loop executes an expression repeatedly as long as a condition is true. This loop is similar to the while loop, but contains an explicit iteration variable. The following example prints the numbers from one to ten. The loop uses the variable x, which is initialized to 1 and incremented after each iteration. for x := 1; x <= 10; x inc 1 do print x end See also
Function
gramschmidtPerforms the Gram-Schmidt process on a matrix.
Function
Function
getAn indexer used to access elements in structures such as arrays and matrices. Examplemx := [[1, 2], [3, 4]]; get(mx, 2, 2) := 23; /* replaces 4 with 23. */
Postfix unary operator
Prefix unary operator
Binary operator
Prefix unary operator
detThe determinant of a matrix.
No-op
Postfix unary operator
!Factorial. The factorial of a non-negative integer n is the product of all non-negative integers <= n. 0! is defined to be one. Exampleprint 7! /* prints 5040. */ See also
Function
echelonReduces a matrix to echelon form. Expects at least one argument (the matrix to be reduced), and optionally a second argument (the augmentation matrix). Returns an array containing the echelon matrix, and the result of the augmentation if it was supplied.
Prefix unary operator
executeLocates and executes a script or an MComp. Exampleexecute 'snake'
No-op
No-op
Prefix unary operator
exitExits Calclipse with a status code. Exampleexit 0
Prefix unary operator
expThe exponential function (e^x).
No-op
Value
Binary operator
crossThe cross product of two vectors.
Prefix unary operator
cbrtCube root.
Prefix unary operator
coshHyperbolic cosine.
Prefix unary operator
Prefix unary operator
Prefix unary operator
cosCosine.
Postfix unary operator
%Example100% /* = 10. */
Function
atan2atan2(x, y) is the angle, in radians, between the positive x-axis and the point (x, y).
Prefix unary operator
acoshInverse hyperbolic cosine.
Prefix unary operator
asinhInverse hyperbolic sine.
Prefix unary operator
atanhInverse hyperbolic tangent.
Prefix unary operator
acosInverse cosine.
Prefix unary operator
asinInverse sine.
Prefix unary operator
atanInverse tangent.
Prefix unary operator
absAbsolute value.
Prefix unary operator
argThe argument (angular component) of a complex number.
Binary operator
Binary operator
*Multiplication.
Prefix unary operator
normfThe Frobenius norm of a matrix.
Prefix unary operator
Prefix unary operator
notInverts a boolean value.
Binary operator
Binary operator
nPrPermutations. The first argument is the number of elements available for selection, and the second is the number of elements to be selected. See also
Binary operator
orReturns true if either one of the arguments are true.
Binary operator
+Plus This operator can be used to concatenate strings and arrays, and to append values to them. Example"here's" + ' johnny'; 'The value is ' + x; {1, 2} + {3, 4};
Left parenthesis
(
Function
Prefix unary operator
lnThe natural logarithm (the inverse of exp).
Function
luCreates an LU decomposition of a matrix. Accepts the matrix to be factorized, and optionally an augmentation matrix. Returns an array containing L, U, P, and the result of the augmentation if it was supplied.
Function
maxReturns the maximum of a set of values.
Function
minReturns the minimum of a set of values.
Binary operator
modThe remainder of integer division.
Right parenthesis
)
Binary operator
/Division.
No-op
,
Prefix unary operator
Prefix unary operator
importAn alias for execute.
Prefix unary operator
Binary operator
Prefix unary operator
Function
ifConditional execution of expressions. Examplex := prompt 'Enter a number: '; if x < 10 then print 'less than 10.'; elif x > 100 then print 'greater than 100.'; else print 'between 10 and 100'; end; See also
Value
Binary operator
-Subtraction.
Function
whileThe while loop is a control flow statement which executes statements repeatedly as long as a given condition is true. The following example prints the numbers from one to ten. x := 1; while x <= 10 do print x; x inc 1; end; See also
Prefix unary operator
waitWaits for a given number of milliseconds.
No-op
Value
Prefix unary operator
tanhHyperbolic tangent.
No-op
Prefix unary operator
tanTangent.
Function
tryTries to evaluate an expression. Returns an array containing two elements. If the evaluation succeeded, the first element will contain true and the second the result of the evaluation. If it failed, the first element will contain false and the second an error message. Exampletry( execute 'something'; );
Function
solveSolves a system of linear equations. Accepts two matrices, the coefficients and the augmentation. Results in a matrix containing the vectors of the parametric solution.
Prefix unary operator
sqrtSquare root.
Prefix unary operator
sinhHyperbolic sine.
Function
sortSorts a given set of values. The values may be supplied as individual arguments, or as an array.
Prefix unary operator
sizeExamplesize [1, 2]; size 'abc'; size {1, 2, 3, 4};
Prefix unary operator
sinSine.
Function
Postfix unary operator
Function
returnReturns from a function or an expression with a value. Exampleif x = 2 then return(3) end; 23;
Function
repeatExecutes statements repeatedly until a condition is true. This control flow statement differs from the while loop in that the first iteration is unconditional. The following example prints the numbers from one to ten. x := 1; repeat print x; x inc 1; until x > 10 end; See also
Function
roundRounds a number to a specified number of decimals. Exampleround(pi, 2) /* 3.14 */
Prefix unary operator
raiseRaises an error. Exampleif x <> 2 then raise 'x is supposed to be 2:('; end;
Prefix unary operator
Value
randA random number in the range [0, 1).
Prefix unary operator
Function
qrCreates a QR decomposition of a matrix. Returns an array containing Q and R.
Prefix unary operator
promptWaits for the user to enter an expression in the console. Returns the result of the expression.
Prefix unary operator
Outputs a value to the console.
Value
piThe real constant pi (= 3.141592...).
Binary operator
;All this operator does is returning its right argument. Since it has a very low priority it may be used to separate multiple expressions.
Binary operator
:=Assignment operator. Stores the right argument into the left argument.
No-op
Function
Binary operator
>=Returns true if the left argument is greater than or equal to the right.
Binary operator
>Returns true if the left argument is greater than the right.
Binary operator
=Returns true if the left argument equals the right.
Binary operator
xorExclusive or. Returns true if exactly one of the arguments is true.
Binary operator
<>Returns true if the left argument is unequal to the right.
Binary operator
<=Returns true if the left argument is less than or equal to the right.
Binary operator
<Returns true if the left argument is less than the right. Data type realThis data type represents "ordinary" numbers. Real numbers with a zero fraction part are used to represent integers. Real numbers are also used as booleans. A boolean is a value that is logically true or false; zero is considered false and everything else true. Data type Data type stringThis data type is used to represent text. Strings are delimited by either single or double quotes. Strings may be concatenated with the + operator. ExampleThe following statement displays a string in the console: print 'This is your wake up call!'; Data type arrayAn array is a collection of values. Each value is identified by an integer index, which is specified when accessing the value. The first value in an array has index 1. ExampleThe following example creates an array containing pi, i and a string: {pi, i, "abc"} See alsoData type matrixA matrix is a two dimensional array of numbers. An element in a matrix is referenced by specifying the row and column indices, respectively. Examplemx := [[1, 2], [3, 4]]; print mx(2, 1); /* prints 2 */ See alsoData type |