|
WHAT IS IT GOOD FOR? It enhances the RWX source code with variables and calculation formulas. Up to 1000 variables can be defined, several operators and functions can be used. The result is (hopefully) an RWX file that can be used in ActiveWorlds based worlds. |
|
download rwp.zip Current version 1.03 dated 12/18/2001 about 36k download size |
DOWNLOAD AND INSTALL Click the link to the left to download rwp.zip Copy it anywhere to your HD. Extract / unzip the contents of the ZIP archive (it contains only the rwp.exe file) into any folder on your HD, best into one where your PATH points to. |
|
SETUP No setup required, but I recommend to define a specific extension to be processed with RWP.EXE, for example *.RWP, so you can just double-click the RWP files in the windows explorer and get an RWX result. |
||||||||
|
USAGE The following example should explain the idea and syntax :
[1.00] While rwp.exe works, it writes a log file with all problems that occured. If you didn't rename rwp.exe, the log file will be called rwp.LOG [1.00] rwp.exe accepts wildcards, you can type rwp *.rwp and it will
process all files with .rwp extension[1.03] Instead of letting rwp.exe decide about the result filename, you can specify it in the command line, separated from the source filename with a @ (AT sign). This helps creating series of models from the same template. Example : rwp -dtex1=stone07 model.rwp@model01.rwx -dtex1=rosa1 model.rwp@model02.rwxSeparator changed from : (colon) to @ (at) in 1.03 (...duh...) [1.00] All variable assignments have to start with a $
in the first column. They can refer only to previously defined variables[1.01] Instead of defining the variables in the code, you can set them from the command line : rwp -Dname=value *.rwp[1.01] Command line variables are valid from the first file behind their definition, that means, that in rwp a.rwp -dblue="0 0 1" b.rwp only the
second file knows the variable[1.01] If a command line variable is modified in a source file, it keeps this modified value in the next file, whereas all variables that are defined inside of a .rwp file are treated as locals and not visible in the next .rwp [1.01] Include statements have to start with $$ in the
first column. Includes can be nested, you can include more files from included files[1.01] Variables from included files are visible in the file that includes them [1.01] Included files can contain all the code that RWP files can contain (RWP and RWX commands) [1.02] Variables can now refer themselves in assignment formulas, a bug sometimes caused problems in the previous version (needed for loops!) [1.00] The asin() example shows problems with floating point precision, but that should not matter too much, it's just "not so nice" :-/ Float control structures $$include filename [1.01] pulls lines from an
external file into the currently processed source file. These commands can
be RWX and/or RWP commands$$loop together with $$endloop cause
a piece of code to be repeated. This loop can only be left with $$break (see below)$$break should only occur between $$loop and $$endloop. It should depend
on a $$if condition (see below). It is the only statement to leave a loop$$if condition together with $$endif make the
code, that stands between them, depend on a condition. This code is only executed
if the condition is true
Arithmetic Operators
+ Add
Conditional (boolean) Operators for $$if
< less than
Functions
log10(), sqrt(), log2(), asin(), acos(), atan(), log(), exp(), sin(), cos(), tan()
|
|
|
|
|