Create MathScripts without a function definition to test sequences of commands without the overhead of defining a function with parameter values. In MathScripts without a function definition, you use global variables instead of parameter values. You can call MathScripts without a function definition from a MathScript Node, a user-defined function, another script, or from the MathScript Console. All elements must be in your project.
The following procedure demonstrates how to create a MathScript without a function definition and how to call this script from the MathScript Console using a specific example. The example calculates the area of a triangle based on the given width and height. The steps you need to take to complete your specific task might be different than the following steps.
A = (W*H)/2
W = 34; H = 4;