Example of YESNO in an Exec
    

This example involves one main Exec, TREE, and three Execs are called by the main one. SubExec1 contains just one line, DOTPLOT 'Diameter'. SubExec2 contains just one line, DOTPLOT 'Height'. And SubExec3 contains just one line, DOTPLOT 'Volume'. Below the Exec code is an example of invoking TREE.

TREE Exec that Uses YESNO

# Reads in tree data and prompts the user for dotplots

RETRIEVE 'TREES'

#

NOTE We will look at data on 31 black cherry trees.

NOTE There are three variables: diameter, height, and volume.

NOTE

NOTE Here are descriptive statistics on the three variables.

DESCRIBE C1-C3

NOTE Would you like to see a dotplot of diameter?

YESNO K1

EXECUTE 'SubExec1' K1

NOTE

NOTE Would you like to see a dotplot of height?

YESNO K2

EXECUTE 'SubExec2' K2

NOTE

NOTE Would you like to see a dotplot of volume?

YESNO K3

EXECUTE 'SubExec3' K3

The user responded NO to the first two questions and YES to the third.

Dialog box:

Session window:

File > Other Files > Run an Exec

Click Select File.

Type TREE in File Name. Click OK.

MTB > EXECUTE 'TREE'