Quick Overview



The first image above is that of Statistics101 in its normal or "editing" mode. The second image above is that of Statistics101 in its "debug" mode with its Edit tab window showing. The primary features of the Statistics101 main window are, from top to bottom: the menu bar, the tool bar, the help bar, and two panels separated by a dividing bar. The upper panel is for editing and debugging Resampling Stats programs, called the Programming Panel, and the lower one one, called the output panel or Output Window, for displaying output text and graphs. Finally, at the very bottom of the frame is the progress indicator, which only appears when a user program is running.

Button

Name

Explanation

New

Causes the Edit Window to be cleared and ready for you to type in a new program. If the current program in the Edit Window has not been saved, you will be asked either to save it or discard it before the window is cleared.

Save/Save As

Saves the contents of the Edit Window into the file in which it was last saved. If the Edit Window contents were manually entered following a "New" menu selection, then you will be requested to specify a file name. If you hold down the shift key while clicking this button it will bring up a "Save As..." dialog.

Check program syntax

Scans the program in the Edit Window to verify that its syntax is correct. Any INCLUDE commands are expanded and their syntax is also checked. Whatever the result, a message to that effect will be displayed in the Output Window.

Indent program

This and the next two buttons are useful to format your Resampling Stats code in the Edit window. This button formats the contents of the Edit Window by indenting all commands that are nested in IF, REPEAT, and WHILE commands. This makes the program easier to read. Does not change the case of any commands. Normally, this button will indent command lines but will not indent comment lines (that is, lines that begin with an apostrophe). If you hold down the Shift key while clicking on this button, it will indent both command lines and comment lines.

Indent program, upper case

This has the same effect as the previous button except that it also forces all the commands to display in upper case. Normally, this button will indent command lines but will not indent comment lines (that is, lines that begin with an apostrophe). If you hold down the Shift key while clicking on this button, it will indent both command lines and comment lines.

Indent program, lower case

This has the same effect as the previous button except that it forces all the commands to display in lower case. Normally, this button will indent command lines but will not indent comment lines (that is, lines that begin with an apostrophe). If you hold down the Shift key while clicking on this button, it will indent both command lines and comment lines.

Mark selection as comment

This and the next two buttons are useful to edit multi-line comments in your program. This one adds the comment marker (') to the beginning of any lines that are selected in the Edit Window. If you hold the Shift key down while clicking this button, any comment mark in the first column of each line in the selection is removed.

You can type in a multi-line comment without worrying about marking each line as you type, then when you are done, you can select your comment and use this button to mark all its lines at once. You can also use this feature to comment-out sections of your code during testing.

You can also use this to remove comment marks prior to shifting the comment lines left or right (using the next button on the toolbar) or prior to wrapping the lines (using the Wrap button, two buttons over). After those changes you can use this button to replace the comment marks.

This works only in the Edit Window, not the Debug Window.

Move selected lines right or left by one space

Moves selected lines one space to the right each time it is clicked. If you hold the Shift key down while clicking this button, it will move the selected lines one space to the left unless there are no leading spaces to remove. This works only in the Edit Window, not the Debug Window.

If you also hold down the Alt key, any leading comment marks (') will be removed, the selection will then be shifted right or left depending on the state of the Shift key, then the comment marks will be reinserted at the beginning of each line of the selection. This is an easy way to shift comment paragraphs.

Wrap selected lines into one paragraph.

Combines all selected lines into one paragraph and wraps the lines:

  • Clicking the button wraps the selected lines so that they are 70 characters or less long.

  • Shift-clicking the button causes it to wrap at 60 characters.

  • Ctrl-clicking causes it to wrap at 50 characters.

  • If you also hold down the Alt key, any leading comment marks (') will be removed, the selection will be reformatted per the above options, then the comment marks will be inserted at the beginning of each line. This is an easy way to reformat comment paragraphs.

Any sequence of blanks will be reduced to a single blank. You can use this to adjust comment lines that are too long or too short.

This should only be performed on text that is intended to be comments. It should not be used on your program code, because the result won't be readable by you or by Statistics101. This works only in the Edit Window, not the Debug Window.

Clear Output Window

If there is no selection in the Output Window, clicking this button will display a dialog asking whether you really want to clear the Output Window. If you answer yes, the window will be cleared. If you answer no, the window will remain unchanged. If you Shift-click this button (i.e., hold down the Shift key and click on the button), the Output Window will be cleared without requesting your permission. If there is a selection, only the selection will be deleted. There is no confirmation dialog for deleting a selection.

Run program

Runs the program displayed in the Edit Window.

Continue program

This button is only enabled when a running program has paused because of the PAUSE command. Clicking this button allows the program to continue from where it had paused.

Abort program

This button is only enabled when a program is running. Clicking this button will display a dialog asking whether you really want to abort the program. If you say yes, the program will quit. If you say no, the program will continue running.

Enter Debug step mode

Clicking this button will start the program into debug mode. Statistics101 will scan your program for syntax errors. If no errors, the program will be started in "step mode". This means that you can step through your program's commands one at a time and observe how your program variables change. If syntax errors were found, the program will be aborted and the first error will be reported for you to correct. NOTE: this and the next two buttons (Continue and Pause) share the same position in the toolbar. Only one is showing at a time depending on what mode the debugger is running in.

Continue program full speed from current step in debug mode

Clicking this button while in debug step mode will cause your Resampling Stats program to continue executing from the current command at full speed. The program will run until it finishes, of encounters a DEBUG command. The DEBUG command will cause the program to pause and go into single step mode.

Pause program in debug mode

If your Resampling Stats program is running in "continue" mode (see previous table row), clicking this button will cause the program to stop where it is and enter single step mode.

Single step

When this button is enabled, clicking it will step through your program one command at a time. Be aware that each operator and each function in a LET command takes one program "step". Therefore, if your program is stopped on a line containing the LET command, it may take several "single steps" to complete the entire LET command.


If you hover the pointer over a button or other GUI feature, a toolTip will appear giving a brief description of its function.

If you right-click (Control-click on the Macintosh) in either window, you will get a context-sensitive menu allowing you to select various actions.

There is a progress indicator at the bottom of the main window. It is only visible during program execution. It moves from left to right as a REPEAT loop progresses, its proportion of the whole indicating the fraction of the loop's iterations that have completed. If there are multiple non-nested REPEAT loops, there will be multiple passes across the indicator. For a WHILE loop, the total number of iterations can't be forecast, therefore the progress indicator shows a shuttle moving in a back and forth motion to indicate that it is processing. If there are no REPEAT or WHILE loops, the progress indicator will not show movement. The cursor will, however, display as an hourglass to indicate that processing is ongoing. Of course, if there are no REPEAT or WHILE loops, the program will probably complete quickly.

Command Help

There are many ways to obtain help on any command. These are:

Edit Window Popup Menu

The Edit Window has a popup menu that appears when you right-click (Mac: Ctrl-click) in the window. The same popup will appear in the Debug Window, but the editing functions will be disabled. This popup menu is shown below.



The following are the options that are available from this menu.

Edit Window Hint Popup Menu

As you are typing your program into the editor, if the cursor is at any point in a word, you can invoke a "hint popup menu" by typing Ctrl-Space (press the Ctrl key and while holding it down, press and release the space bar, then release the Ctrl key). The hint menu will present a list of names from which you can select one to complete the word you are typing. The menu list actually consists of one, two, or three sublists from which you can select a command or subroutine name or a variable name. The first list comprises all the commands and subroutine names (if any) that begin with the letters preceding the cursor. The second list comprises all (if any) of the vector variable names that are "in scope" and match the letters preceding the cursor. The third list comprises all (if any) of the string variable names that are "in scope." If you select an item from the lists, that name will replace the word that contains the cursor. If you want to make no choice, type the Esc key to dismiss the menu. The next figure shows what the popup looks like:



In the figure, the cursor is just after the "O" of NORMAL in line 108. Therefore, all the commands and subroutine names that begin with "NO" are listed. A separator bar divides that list from the second list, which displays the names of in-scope variables. "In scope" means that if the cursor is in a word that is inside a subroutine definition, then only global variables and variables that exist within that subroutine are listed. If the cursor is in a word that is not in a subroutine, then only global variables and variables that are not in a subroutine are listed. In general, the hint menu system attempts to restrict the lists to only those names that are valid at the point of the cursor. Therefore, for example, only variable names will appear in the hint menu if the cursor is not in the first word on a line, but command names and variables both will be listed (as in the above figure) if the cursor is in the first word of a line. Variables are listed at the first word in case you might want to change the command into a LET command, which allows a variable to be the first word on the line.

If you hover the cursor over any entry in the command/subroutine popup list, a tooltip explaining that item will appear. You can see a tooltip in the above figure.

If you use the right or left arrow keys while the hint popup menu is displayed, the cursor will move as directed and the menu will be revised to show matches appropriate to the new cursor position in the word. As you move the cursor left, more choices will appear until you move off the word. As you move it right, fewer choices or no choices will appear. If you type any letter or number key while the menu is displayed, that character will be inserted at the cursor position and the menu will be revised to show the reduced choices based on the new character. You can use the Delete and Backspace keys while the popup is showing and they will have their usual effects.

If the hint menu does not appear when you type Ctrl-Space in the Editor it means that the cursor is not in a word or there is no match for the characters to the left of the cursor, or there is a syntax error in your program that precludes accessing matching variables. You will be warned if your program has a syntax error when you press Ctrl-Space. Since the Debug tab doesn't allow editing at any time, typing Ctrl-Space in that tab's window will not display the hint popup menu. Also, during debug mode, Ctrl-Space is disabled in the Edit tab's window for the same reason.

Note that you must have at least one letter before the cursor for the menu to match against. Matches are only made on command, subroutine, and variable names. The matching process makes up to two attempts to find names that match the letters before the cursor. In the first attempt, it tries to find exact matches, that is, command, subroutine, and variable names that begin with exactly the characters ahead of the cursor. If it succeeds in finding at least one, then it displays the popup menu with those names and doesn't make the second attempt. If it failed to match at least one, then it will attempt to find a "partial" or "fuzzy" match. A partial match is successful when all the characters preceding the cursor are found anywhere in a name and in the same order. Thus, "cds" would match all of these: CHISQUAREDIST, MAKECUMDIST, and SORTCOORD_DESC.

Output Window Popup Menu

The Output Window has a popup menu that appears when you right-click (Mac: Ctrl-click) in the window.



The following are the options that are available from this menu.