An output gizmo lets you see the current value of a variable while your program is animating. You can think of it as a tiny printer, if you like, upon which you show the current value of a variable.
Like input gizmos, output gizmos have a name that functions as a description of the value being displayed. This name has no technical connection with any variable name, but since an output gizmo is often used to present the value of a variable, it often has a similar, or identical, name to that variable.
The labels for the output gizmos are '1st Output', '2nd Output', and so on. The output gizmo's label is used to reference it from within your program code. For example, if you want to show a variable's value through the 1st output gizmo, then in your code you would use the set1stOutputValue command. You can not change the label for an output gizmo.
The name on an output gizmo is used to describe the meaning the output. The name defaults to 'Name', but you can change that. If you want to use an output gizmo to show the radius of a circle, then you might rename it 'Radius'. Understand that this is not hard wired to the name of a variable. There is actually no connection between the name of an output gizmo and the name of a variable except, sometimes, in our minds. Do not think that simply naming an output gizmo the same as the name of a variable within your program code will cause the value of that variable to be shown through the output gizmo. There is no automatic connection of this type. You need to use commands like set1stOutputValue to make that connection. The name of the output gizmo reminds us of its meaning; it is a description of the number being output. It's just a sign, though, and technically not a variable's name.
The example program demonstrates a classic EZ Math Movie animation form. A shape, a simple point in this case, is moved back and forth across the graph. The repeating loop code section does the following:
Using output gizmos is handy, but it will slow your program down a bit. As it turns out, it takes some computing time to get a value out of your code and on to the screen. You can experiment with this effect by changing one line of code. Find this line in the loop code section:
This is the code that sends the value of the variable x to the 1st output gizmo. Turn it into a comment by placing two slashes at its start, like this:
Now the line will be ignored by the computer, and you can see if the program animates any quicker. Run the program again with this line 'commented out'. On many computers the point will move a bit faster and smoother. So, the output gizmo is very handy, but it may slow down the performance somewhat.
Next tutorial: Rectangle area