lsmath by Fallout ver 0.3.2


sections
HOWTO
File list
To come
changes
contact info

HOWTO


installation:
this is a module, just like any other module and your step.rc needs to have
*Netloadmodule $lsmathmoduledir$lsmath.dll
inside it, where $lsmathmoduledir$ is the directory where lsmath.dll is located (normally $ModulesDir$)

available step.rc commands:
MathReadOnlyRCVars [bool] allows you to use evars within equations
evars are read-only because the module would need to know where the var is if it can be changed.
MathDebug [bool] brings all kinds of messageboxes
very minimal debugging for your math equations
MathWarnings [bool]warnings from your scripts
MathErrors [bool]errors from your scripts x/0, etc.

this dll provides 3 bangs:
!mathfile filename
!mathequation equationargs
!mathsave
It is meant to work with mzscript.dll to extend its capabilities (but you can do other things like assign equations to hotkeys if you desire, or even hotspots!)

!mathfile filename


changes the file to be used by the dll and the variables that it uses file is kept until next time !mathfile is called

!mathequation equationargs


a C/C++ style equation that is to be solved
EVERY equation that can be written in C++ that deals with integers or doubles should be able to be done here, with exactly the same syntax

!mathsave


saves the file that is being used by mathfile

example:
$configdir$varfile.rc
---------------------
width 51
height 11
style 2

$configdir$script.rc
--------------------
*script bang !setwidthheight
    *script exec !mathequation width=3*(5+6*style)
    *script exec !mathequation height = 3 + 4 * style
*script ~bang

*script bang !increasestyle
    *script exec !mathfile $configdir$varfile.rc
    *script exec !mathequation style += 1
    *script exec !setwidthheight
    *script exec !mathsave
*script ~bang

*script bang !decreasestyle
    *script exec !mathfile $configdir$varfile.rc
    *script exec !mathequation style -= 1
    *script exec !setwidthheight
    *script exec !mathsave
*script ~bang

notes about $configdir$varfile.rc (or whatever file(s) you are using to store variables)

operations and order of operations are as follows: (anything in a group is done left to right unless otherwise noted)
first done ( ) parenthesis (although they aren't really operations, just modifiers to precedence)
right to left!
~
-
+
not 1->0 and 0->1
bitwise not (flip every bit treated as a signed integer 16 bits)
unary minus (only 1 operand)
unary plus
*
%
/
multiplication
modulus (remainder upon division)
division
+
-
addition
subtraction
<<
>>
shift left (2<<3)->16 anyone who understands bit manipulation should recognize these
shift right (16>>3)->2 they are standard in C/C++ as is everything else here (except ~=)
<
>
<=
>=
less than
greater than
less than or equal to
greater than or equal to
==
!=
equal to
not equal to
& bitwise and
^ bitwise exclusive or
| bitwise or
&& boolean and
|| boolean or
? : conditional statement(x?y:z = if(x)then y else z)
right to left
last done
= += -= *=
/= <<= >>=
$= |= ^= ~=
assignment operator
these operators all can be expanded like
a-=b can be rewritten as a=a-b

more things to know

File list


lsmath.dll - the module
readme.htm - this file
src\*.* - the source code to the dll

To come


changes


contact info


Fallout
homepage: billbarry.tripod.com
deviantart: after-fallout.deviantart.com
neowin name: after fallout
aim: after fallout
icq: 28308618
msn: after_fallout@yahoo.com or at18326@yahoo.com
Y!: after_fallout@yahoo.com or at18326@yahoo.com
email: after_fallout@yahoo.com or at18326@yahoo.com