MIFFS Is Fun For Sums
by rich
There are now too many builtin functions to list all of them here.
Open the JAR file in a Zip
program and read the *.miffs files in the /rich/miffs directory to see the definitions
of the functions in the default environment. Some of the more common functions are
still listed below for convenience. You can also use the vals function
to list all defined labels, and you might be able to guess the meaning of a
function from its name. I hope to introduce some kind of value browser in a future
release.
These are used between their arguments, and have an associated precedence (the higher the number, the 'tighter' the binding)
||, | --- boolean OR (you can also use 'orelse')&&, & --- boolean AND (you can also use 'andalso')< --- less than> --- greater than<= --- less than or equal to>= --- greater than or equal to:: --- "cons" - prepend to list@ --- concatenate listsin --- unit conversion (scalar * unit -> scalar)+ --- addition or string concatenation- --- subtraction (also a unary negation function)* --- multiplication/ --- divisiondiv --- integer divisionmod --- integer modulo^ --- exponentiation or string concatenation% --- the modulo operatorThe use function expects a string referring it to a
file of MIFFS code. It will then process this file as if you had typed
it all in. The "startup.miffs"
file is processed every time MIFFS loads, and sets up all the functions
listed lower down this page. You can change the functions MIFFS starts
with by editing this file, or by putting a replacement "startup.miffs" file in the same
folder as the MIFFS.jar file. This file will be used instead of the old
one.
The native function is the only other function that is
built into MIFFS (not counting those defined in the library files). It
is used to access functions defined in the source code of MIFFS from a
library file and would not be needed by a regular user.
Warning: the following information may be out of date
The following libraries are, by default, loaded by MIFFS on startup, although you can change this if you want (see "use" above).
Each of the trig functions work on complex values. This means they take the principle complex branch of the function - which may, in places, be different from the branch usually taken for e.g. asin, but is equally valid.