Here is a quick-reference card of essential MUF syntax and operators:
Strings: "Hello, world!\n" Characters: ' ' 'H' '\n' Comments: ( Very good. ) Integers, floats: 1 1.0 2.3e4 0.1e-4 Stack functions: pop swap rot dup Printing something: , Arithmetic ops: + - * div mod logand logior logxor ash gcd lcm frandom Trancendental fns: exp expt log log10 sqrt abs ffloor fceiling Trigonometric fns: acos asin atan atan2 cos sin tan cosh sinh tanh String functions: join stringUpcase stringDowncase stringMixedcase substring ]print Defining functions: : fnName (function-body) ; Loops: for i from 0 upto 19 do{ ... } for i from 19 downto 0 do{ ... } Global variables: expression --> variable-name Local variables: expression -> variable-name Comparison tests: = != < <= > >= Boolean functions: not and or Conditionals: (test) if (expression) else (expression) fi Block functions: [ (stuff) | seq[ |mix |sort |pop |push ]pop words[ ]words chopString[ ]glueStrings |for key do{ (stuff) } |for key val do{ (stuff) } Indices: makeIndex 1 --> obj.a 1 --> obj[i] obj foreach key val do{ (stuff) } Packages: "name" inPackage pkg:x pkg::x lf lv
Go to the first, previous, next, last section, table of contents.