Windows In Basic

by Robert Doerr

Why windows? Mainly, I think, to get the attention of the user.

There are two kinds of windows to be written In Basic. I call them informative and active windows. If the program can restore a screen, then a window consisting of an attention getting Informative mes sage can be displayed within a border, say, upon certain data entry errors.

The last line of such a message would typically be: "Hit < ENTER > to continue*. Upon an < ENTER >, the original screen would be restored.

An active window would be used for, say, a menu. Instead of the common "Please enter your selection by number* sort of line on a menu screen, with an active window, selection could be made by positioning the cursor at, or on, the option desired and hitting < ENTER >.

The menu could be a menu of menus; the posl tlons of succeeding windows could serve to Indicate the depth to which the selection process has gone. The number of columns of options displayed is limited only by the space on the screen; this blurs any distinction between such windows and full screen operations.

I wrote the following small program to demonstrate the process. This Is a complete program, so you may type It In and RUN It

10 REM Demonstrate MENU WINDOW in BASIC

20 REM (c) 1988 Robert M. Doerr

50 [email protected](0,16)," *;STRING$(25,35)' ■;: FOR R — 1 TO 21 *

DATA OPTION 1,OPTION 2,OPTION 3,''ONE ",

0 0

Post a comment