- Lab 3:
- Create a new primitive called
primlab3
.
- The primitive should take in
1+
arguments.
- Each argument will be the name of a result.
- For each argument, get the result which matches that name.
- If there is no matching result print out a warning that such
a result does not exist.
- If the result is a number, delete the result.
- Tip: Use the
StringUtil.isNumber(...)
method.
- If the result is not a number, print out a warning that the
result can not be deleted.
- In the case that the result is a number, print out an INFO statement
explaining that it has been deleted (include the name of the result
and its previous value in the message).
- But only show this if the user supplies the
/VERBOSE
switch
or if the command is run outside of a macro.
- Tip: All commands have a
verbose
variable that is automatically set to
true
if /VERBOSE
is set or if the command is run outside of a macro.
- Build and test your primitive.
- Try it with
/VERBOSE=FALSE
and /VERBOSE=TRUE
.
- Also try running it from a macro with and without the
/VERBOSE
switch.