Because of Java package and file conventions, keep these two rules in mind when adding new primitives:
Additionally, these are the NeXtMidas rules for primitives:
There are two way to add new primitives:
The first method is the easiest way to add a new primitive.
For instance, to write a primitive that takes in one input file
or pipe, and outputs one file or pipe, consider starting with the NOOP
command.
Assume an option tree called user is on the path and a
primitive called newprim is desired:
NOOP
from the prim area SYS option
tree to the prim area of the user option treenoop.java
file in the user option tree
to newprim.java
newprim.java
from
package nxm.sys.prim; to package nxm.user.prim;To override a command (keep the same name but in a different option tree), use the CHECKOUT command.