Instructions : (1 per line) A line is a comment, a rule, an affection, a target or an expression. Comments begin with // ============================================================================ Rules: A rule begins with a point ('.') Title of the exercise : .title=... Description of the exercise : .descr=... Number of Rows to build : .rows=... Number of Columns to build : .cols=... Textsize : .size=... Start Numbering of exercices : .nr=... (without numbering : .nr=) Views : .view=... (each letter of ... in ('S' (solution), 'Q' (question), 'F' (form), 'N' (none)) Hide the lines from this line on to end : .hide ============================================================================ Affection: a variable gets its value from an expression. A variable is defined when it is used for the first time. The variable ix is the number of the current exercice and is allways defined. = A standalone expression will be a part of the final result. An expresssion can be a constant value, a variable or a function. ============================================================================ Targets: a target begins with ':' you can jump to a target with instruction goto (e.g. if(gt(a,3),goto("targ4")) ============================================================================ Constant values: a numeric constant value begins with a digit or '-' a string constant value begins with '"' or "'" ============================================================================ Functions: absolute value : abs() division : div(, ) greatest commun divisor : gcd([,...]) or gcd(list([,...])) gcd0(...) like gcd, but 0-values ignored integer value : int() inverted value (1/x) : inv() logaritme base 10 : log10() logaritme (default base=e) : log([,]) maximum value : max([,...]) minimum value : min([,...]) modulo : mod(,) multiplication : mult([,...]) negated value (-x) : neg() power : pow(, ) quotient : dive(, ) round : round( [, ]) sign (-1,0 or 1) : sign() square root : sqrt() substraction : sub([,...]) sum : sum([,...]) sumprod : sumprod(,) ------------------------ concatenation : cc([,...]) coefx(
  • ) coefx(list('+x','+y','-z','w')) => x+y-z+w coefx() 0=>'' 1=>1 -1=>-1 coefx(, '+') 0=>'' 1=>+1 -1=>-1 coefx(, ) 0x=>'' -1x=>-x 1x=>x 2x=>2x coefx(, , ) 1x''=>x 1x'+'=>+x 2x''=>2x 2x'+'=>+2x -2x'+'=>-2x example : coefx(a,"x","+") im(, [list(item1, value1,...)]) example : im("http://example.com/image.jpg", list("width","50%", "border","0", "alt","schema")) formatting : ft(,) may contain letters 'b'(bold),'i'(italic),'u'(underline),'r'(red),'e'(exponent),'x'(index), or 'h1'-'h7' result( [,]) output is considered as result and will be hidden or shown (by click on question mark image on top of page) ------------------------ Random number : rnd(, [, [,] ) Random number between and is the number of decimals (default=0) : list of items that are not accepted as result (may be simple element if there is only one) example : rnd(1, 2, 1, list(1.2, 1.5)) or rnd(-5, 5, 0, 0) Random prime number : rndprim(, [, ] ) Random number between and : list of items that are not accepted as result example : rnd(2, 11, list(5)) Random item from list : rnditem( [,]) but item must not be in list if is not an array, item must be different from ------------------------ List contains given element ? : contains(, ) Build a list : list([,...]) Permute a list : perm() Search element in list : index(, ) (-1 if not found) Give element at index : item(, ) Remove an element of rmitem(, ) ------------------------ logical - greater than : gt(, ) logical - greater or equal : ge(, ) logical - equal : eq(, ) logical - not equal : ne(, ) logical - less than : lt(, ) logical - less than or equal: le(, ) logical - and: and([, ...]) logical - or: or([, ...]) logical - not: not() alternative : cond(, , ) if(, [, ...]) ------------------------ special - crela - crela() : create random expression (variable not used) special - crela - crelaJava : get Java expression based on last created expression special - crela - crelaLatex : get Latex expression based on last created expression special - crela - crelaImg : get Image based on latex expression from site http://latex.codecogs.com/gif.latex crelaImg(,,) crelaImg(150,"LARGE","//vec{u}") (// replaced by '\') ------------------------ special - crepq - crepqEval(,) : evaluate expression crepqEval("3x+5(x-10/4)", "java") => 3x+5(x-2) crepqEval("3x+5(x-10/4)", "") => 3x+5(x-2.5) crepqEval("!(a>5)", "java") => a<=5 ------------------------ special - creta - creta(,,,) : create table (variable not used) special - creta - cretaOut() : get Java Methode to solve table. mode : STD : only 1 if-structure, only 1 return, without complex conditions, without initialisation of result STI : only 1 if-structure, only 1 return, without complex conditions, with initialisation of result RET : without complex conditions, without else, without initialisation of result CPX : with complex conditions, with minimum of conditions, without initialisation of result ============================================================================ Loops: repeat(,[,...]) - repeat instructions times until(,[,...]) - repeat instructions until condition is verified (loop is executed at least once) while(,[,...]) - while condition is verified repeat instructions (loop may be not executed) Alternative: if(, [, ...]) Jumps: goto() - jump to target (only forward, not backward, targets are defined by ':') ============================================================================