OOF: Finite Element Analysis of Microstructures

Combining Commands next up previous contents
Next: Defining Macros Up: The Text Interface Previous: Variables   Contents

Combining Commands

Multiple commands can be typed on one line, so you can execute Functions from Submenus like this:

OOF >> distort set ystrain = .01
OOF >> distort set top
OOF >> distort increment
Semicolons can be used to delimit commands. They are optional unless you're omitting arguments, in which case the semicolon is required so that OOF doesn't try to interpret the second command as an argument of the first one:
OOF >> select elements circle; modify replace empty gray=1
*Enter x [0]: 0.5
*Enter y [0]: 0.5
*Enter radius [0]: 0.2 
OOF >> select elements circle modify replace empty gray=1  
=== "modify" is not a recognizable argument!
=== Command "circle" not executed.
It's a good idea to use semicolons after all Functions and Variables when combining commands on one line.

When executing multiple commands from a single Submenu, parentheses can be used to keep OOF from popping back to the main menu after each Function or Variable. Parentheses can be nested. The first example in this section could have been written

OOF >> distort (    
distort >> set    
set >> (ystrain = .01 
set >> top
set >> )
distort >> increment
distort >> )
OOF >>
or even
OOF >> distort (set (ystrain=.01; top) increment)

/* Send mail to the OOF Team *//* Go to the OOF Home Page */