basic data programs - university of michigan dearborn

25
Basic Data Programs Chapter 9 323 EXCEL VISUAL BASIC FOR MACRO SHEETS. TERM DESCR_1 DESC_2 DESC_3 DESC_4 DESC_5 DESC_6 File New Open Close Save Save As Save Workspace File Properties Shared List Page Set Up Print Preview Print File Send Add Routing Slp 1.Subject.xls Edit Undo Entry Cant Repeat Cut Copy Paste Edit Clear Delete Sheet Move Copy Sheet Find Replace View Debug Window Insert Worksheet Chart Macro RUN Start End Reset Step Into Step Over Toggle RUN Clear All Bk Pt Tools Add Watch Edit Watch Instant Watch Reference Protection Add in Tools Make Add-in Macro Record Macro Assign Macro Menu Edit Attach Tool Tools Options Window New Window Arrange Hide Unhide Split Help Excel Help Answer Wizard Network Lotus About Excel MACRO Visual Basic Menu FIND A COMPILER, SUCH AS BASIC OR JAVA, FOR MODELS. SITE. Find programs on AOL MEMBER or NETSCAPE SITE. COPY and PASTE model code. Use Excel Visual Basic. Transfer JDK Java Newsletter and compilers. Select Qbasic from CD OTHER\OLDMSDOS. Create Program Files or COPY (.html) and Database. Owners face some problems converting models to new com- puters. Enter and Edit Material. Word Processors. Data Files. Gold Star 316. DOS. Wordperfect 5.1. Use control keys and special function template keys. Select (F12) key and block data with the cursor. (F11) key reveals typeset codes. Alphaworks Word Processing, Database, and Spreadsheet special services. Select a service menu term and a fun- ction key line. Associate each term with a special function (F) key. Create Large Files with Database. Create ASC file. Packard Bell. Create .csv. Wordperfect 7. INSERT. Word 7. INSERT file.. DOS and WINDOWS graphic text lines and font change. Keyboard. Keyboard layouts vary from typewriter to computer. Become familiar with the keyboard. Find (Insert), (Delete) and (Enter) keys. Special Function (F) and (directional arrow) keys may vary in location. Use keys or toolbars and a mouse. RESEARCH. Objective to Keep in Mind for Models. Review language and baseball card collection data on laboratory disks or MEMBER internet sites. Collect all material. Complete research. Language Word List Files. Enter phrases or words into a column. Use new vocabularies in lesson models. COPY language Databases. Create Sports Statistics Data Input Files. Create software service DIF files.

Upload: others

Post on 12-Sep-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 323

EXCEL VISUAL BASIC FOR MACRO SHEETS.

TERM DESCR_1 DESC_2 DESC_3 DESC_4 DESC_5 DESC_6

File New Open Close Save Save As Save Workspace

File Properties Shared List Page Set Up Print Preview Print

File Send Add Routing Slp 1.Subject.xls

Edit Undo Entry Cant Repeat Cut Copy Paste

Edit Clear Delete Sheet Move Copy

Sheet

Find Replace

View Debug Window

Insert Worksheet Chart Macro

RUN Start End Reset Step Into Step Over Toggle

RUN Clear All Bk Pt

Tools Add Watch Edit Watch Instant Watch Reference Protection Add in

Tools Make Add-in Macro Record Macro Assign Macro Menu Edit Attach Tool

Tools Options

Window New Window Arrange Hide Unhide Split

Help Excel Help Answer Wizard Network Lotus About

Excel MACRO Visual Basic Menu

FIND A COMPILER, SUCH AS BASIC OR JAVA, FOR MODELS.

SITE. Find programs on AOL MEMBER or NETSCAPE SITE.

COPY and PASTE model code.

Use Excel Visual Basic.

Transfer JDK Java Newsletter and compilers.

Select Qbasic from CD OTHER\OLDMSDOS.

Create Program Files or COPY (.html) and Database. Owners face some problems converting models to new com-

puters.

Enter and Edit Material.

Word Processors. Data Files.

Gold Star 316. DOS.

Wordperfect 5.1. Use control keys and special function template keys. Select (F12) key and block data with the

cursor. (F11) key reveals typeset codes.

Alphaworks Word Processing, Database, and Spreadsheet special services. Select a service menu term and a fun-

ction key line. Associate each term with a special function (F) key.

Create Large Files with Database. Create ASC file.

Packard Bell. Create .csv.

Wordperfect 7. INSERT.

Word 7. INSERT file..

DOS and WINDOWS graphic text lines and font change.

Keyboard. Keyboard layouts vary from typewriter to computer. Become familiar with the keyboard. Find (Insert),

(Delete) and (Enter) keys. Special Function (F) and (directional arrow) keys may vary in location. Use keys or toolbars

and a mouse.

RESEARCH.

Objective to Keep in Mind for Models. Review language and baseball card collection data on laboratory disks or

MEMBER internet sites. Collect all material. Complete research.

Language Word List Files. Enter phrases or words into a column. Use new vocabularies in lesson models. COPY

language Databases.

Create Sports Statistics Data Input Files. Create software service DIF files.

Page 2: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 324

1. Construct sports rosters on Database files. Enter current player names. Add rookies.

2. COPY (.html). Enter statistical data in Spreadsheet. SAVE data on WORKBOOK laboratory disk.

3. Access. Use Visual Basic Dialogue boxes.

Index. DEFINE TABLE. GENERATE a subject list index.

USE DATABASE. CONVERT SPECIAL SERVICE TO ASCII DATA FILES.

Convert Data Files. Convert (.html) to Database or Spreadsheet DIF files to ASCII sequential data input files. Provide

data input files to Baseball Card Collecting Model Case Studies in Chapter 12.

Transfer Data Files. Convert Alphaworks laboratory Spreadsheet DIF files to ASCII sequential data input files for

models. EXPORT to Database (See Program Code List #2).

Input Files. Choose from Database in models (See Chapter 4, Forms #1 and #2 and Chapter 13). Convert new se-

quential language verb files to relative files with indexes for student exercises to construct sentences.

Gwbasic Compiler. Copy from floppy disk to Packard Bell.

Internal Compiler TI99 Model. Use historical data in older computers. Transfer program model list documentation

from screens to documents. TI-Writer and TI99 Basic programs use direction keys (FCTN and E, S, D, X) and special

function key combinations.

Visual Basic GUI or MSGBox Title:= "" Prompt:= (field$) . Use "&", " ", and chr(13) to display literals and ASC

input # data fields.

BASIC PROGRAM MODELS.

1. Copy Computer Program Models. Use MEMBER directory (.html) (Chapter 12, Case Study DOS and TI99).

2. Skills for Computer Model Programs (See Chapter 9). Write more new programs for lessons. Learn new com-

puter commands in computer exercises. Develop list processing skills.

3. Convert to Other Computers. Improve Model Building Skills. Select computer commands. Apply correct

program statements for better models. FTP (.html).

4. Program Model Prompt. Use msgbox or print. Display program notes and names on computer screens and on

printed reports. Extra prompt: statement code line makes data and report references much more consistent in docu-

mentation. Exercise good control. RUN programs in proper system sequences. Compare data at any time. Change

programs. Models can be changed over the long run.

5. Produce Operational Output. Use models for programmed learning, even in a limited time allocations.

6. Document Models. Document models, text subjects and menu terms with Word Processors. FTP to SITE.

7. Generate Subject Indexes. COPY. List pages or numbers for models to use.

CHOOSE DATA FILES.

Create Laboratory Files. Select WINDOWS or DOS Spreadsheet. Transfer (.html) data files from MEMBER

directories.

MATCH SPORTS FILES.

Baseball Card Collection Processing Programs. Match sports Database player rosters with Spreadsheet (.html) statis-

tic files (See Chapter 8, Alphaworks or Excel). Take data items from one file. Insert data in other files (See Chapter 5

and 6). Pick up information from both files.

INTERACTIVE LANGUAGE MODEL.

Models. Start TI99, Apple II or Gold Star DOS model. Direct language model lesson phrase output to disk files.

Review.

Basic Files to Word Processor. Select Word Processor to improve the assignment output. Develop better performing

computer models. Apply many more details to more complex program models later, when new situations develop.

COMPUTER PROGRAMS. WRITE CODE.

Card Programs. Univac COBOL code was written on forms. The listings were changed by:

1. Crossing out lines.

2. Adding arrow or other insertion and deletion notes. Programs on punched cards were duplicated and copied.

Screen List Programs. COPY compilers to new computers.

Operate Program Model and File Systems. FIND files RUN programs.

Page 3: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 325

Consult Aid Indexes.

1. Use ((shift) (F1)) AID key to summon computer.

2. Use programming manuals or CD.

Layout Program Code Logic. Organize Compiler System.

COPY or Write Programs. Computer owners may write program models for the first time on new computers. Enter

program code into computers through the keyboard. Test computers for speed or memory size with sample programs.

Enter and display data. Display simple informational messages with small programs. Scroll data on Gwbasic screens.

Newer programs use fixed screens.

BASIC COMPILER.

Select DOS. Select Qbasic, Gwbasic, Visual Basic, Applesoft, TI Basic, computer compilers. Compilers interpret pro-

gram commands or statements. Program terms are changed into computer memory bits and bytes to process data from

disk addresses.

Copy Programs from Disk. Select or LOAD programs from Web SITE or from laboratory disks.

Menu. Select menu terms or special function (F) keys to LOAD, RUN or LIST Gwbasic and Qbasic program code.

Program compilers use the same menu (directional) keys as software. Find code. Make changes.

Visual Basic, #1 Menu

QBASIC SPECIAL FUNCTION (F.) KEYS

Qbasic #2, Function Keys

Qbasic, #1 Menu

Review Compiler One Line Menu. See Visual Basic menu #1. Compare with Qbasic #1.

QBASIC COMPILER MENU.

Qbasic EDITOR (Also Visual Basic). Highlight to Select FILE from Menu Bar Terms. Show code modules in

screen windows. Move cursor with the (alt) key or mouse. Select terms. Each function has several operations.

AID. Summon aid with ((shift) (F1)) key combinations.

Select Menu Bar Terms:

1. NEW. Enter new program statement code lines (without line numbers). Choose numeric labels for goto. Select

SAVE or SAVE AS. SAVE program code lines as a program files with names. Save programs with other file

names as back ups.

2. OPEN Old Files. Review disk directories. List programs on subdirectories. Laboratory APPENDIX disks provide

program examples. Choose files with (.bas or .exc) file extensions. Highlight and retrieve desired old programs.

3. Select Scroll Arrow. Scroll program code listing. Note that program line numbers are optional. Code line numbers

FILE EDIT VIEW INSERT RUN TOOLS WINDOW

ESC Cancel Previous

F1 HELP

F2 SUBS

F3 REPEAT FIND

F4 OUTPUT SCREEN

F5 RUN

F6 WINDOW

F7 REMOVE MENU

F8 STEP

F9 TOGGLE

BREAKPOINT

F10 PROCEDURE STEP

FILE EDIT VIEW SEARCH RUN DEBUG OPTION

Page 4: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 326

from Gwbasic programs are acceptable. Remove line numbers, if desired.

4. RUN (F5 key) programs. Cancel. RUN functions can RESTART or continue programs.

5. VIEW (Visual Basic Debug-print). Show Qbasic output screens. Develop, test, and change programs.

Qbasic #3, Editing Keys

Qbasic #4, Copy Keys

Programs Change Data.

Change data files.

Use SUB routines.

Change Code Lines. Highlight blocks of lines.

Delete Lines.

COPY. Block Code. PASTE. Select EDIT. COPY code from one program segment to another. Use ((Shift) and

(arrow)) keys. Highlight and block code lines. Use mouse to move cursers on screens.

Insert Lines. Use ((Shift) and (Insert)) keys. Incorporate simple programs into more complex programs. Avoid dupli-

cate labels.

Qbasic #5, Mouse Functions

SEARCH.

Select SEARCH. Find code lines to edit. Choose label numbers instead of LINES for GOTO statements.

GRAPHICS QBASIC PROGRAMS.

Short and Simple Graphics Programs (See Games.htm). Incorporate graphic line subroutines for screen data in later

versions.

Test. Select DEBUG and then TRACE. Executing program statements appears in bold. Select VIEW to switch screens

between program code and images being formed on screens. View (F6) subroutines in windows. Use special program

code routines in program module coding window.

Watch. Use debug.print.

COMMUNICATION. ON COMM 2. RS232 - OPEN "com2: 9600,N,8" as file #1.

Gwbasic #1, Gwbasic Menu

Enter Complete Entry

End Go To Screen Line End

Home Go To Screen Line

Beginning Column

Insert Insert Letter

Enter/Exits Insert Mode

Delete Delete Letter

((CTRL) (C)) Stop Run

Back Sp Backspaces

((Shift) (Ctrl)) Copy

((Shift) (Delete)) Delete

((Shift) (Insert)) Insert

MOUSE Move

MOUSE (Button) Update and Choose Files

LIST RUN LOAD" SAVE" CONT LPT1 TRON TROFF KEY SCREEN

Page 5: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 327

Gwbasic #2 Special Function (F) Edit Keys

OLD DOS 4.0 Gwbasic GWBASIC COMPILER.

Select the Word Processor to GO TO DOS. Select Gwbasic compiler. Use less memory than Qbasic.

Gwbasic Functions. Display a Gwbasic Menu program line.

Menu (F). One line menus offers quick reference.

Qbasic DOS 5.0 change key functions.

Data. Compilers LOADED on new computers read transferred data files differently.

DOS Mouse Menu. Select MENU keybase mouse or pop-up Trackball command in (.bat) file for mouse in Gwbasic

programs.

Gwbasic #3, Mouse Functions

Mouse (Buttons) may then be used as special function keys in some instances.

Gwbasic Program Code.

1. LOAD (F3 key) programs.

2. RUN (F2 key) programs.

3. SAVE (F4 key) code for program models.

4. Cancel programs with ((Ctrl) (C)).

View Program Code. Review screens or other computer output before computer programs go to end. Continue to RUN

programs with (F5) key. Gwbasic Trace. (F7) and (F8) keys starts and stop traces from displaying program statement

line codes as program statements are executed. Debug programs copied or written. Gwbasic LOAD commands are

invalid in Qbasic.

Old Compilers. Gwbasic, Applesoft or TI99 Basic.

Compilers determines if any structural errors in program statements exists.

Old Programs Use Line Code Numbers. Review program listings. Reference program line numbers or subroutines.

TRAINING EXAMPLES.

Use Data Files. Simple programs open data files as output. Take simple input from the keyboard and practice. Change

code. Easily insert program commands.

RUN Program. RUN programs. Errors may exist. Correct the placement of special character. Correct parameters for

screen line or column numbers. Insert statements omitted by mistake.

Use Line Numbers then Program Code Statement. Write programs with code line numbers. Display program code

line numbers on screens. Add program code on the same row as line numbers. Program code line number labels are in

ESC Cancel Previous

F1 LIST

F2 RUN

F3 LOAD"

F4 SAVE"

F5 CONT

F6 LPT1:"

F7 TRON

F8 TROFF

F9 KEY

F10 SCREEN 000

F11

F12

MOUSE Move

MOUSE Button Choose and Update Files

Page 6: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 328

front of program statements.

Consult Program Manuals. Key in Num for Basic or Auto for Gwbasic. The compiler automatically numbers program

lines. A number, such as 100, appears on the screen,

100

Qbasic. Sequence numbers are not used. Use numbers as paragraph labels.

Message Prompt Display. Use

print (DOS)

msgbox (WINDOWS)

display (TI99)

program commands.

Alphabetic Characters, Require Special Handling. Enclose messages, alphabetic expressions, words, or special

characters between words, such as spaces or commas, in quotes or double quotes " " .

The special characters are accepted as part of the literal. Data strings descriptions may contain alphabetic capital or

small type. No typeset is used by Basic. Identify files and programs with quotes.

Select Basic for Programs.

1. Enter First Code Line.

Select Gwbasic programs.

Complete program code line 100. Select (Enter) keys.

2. The Next Program Code Line Number. The next number is automatically displayed with on the next row on the

screen.

200

Key in the next program code statement at the cursor.

3. Cancel automatic program numbering commands. Use either

((Ctrl) (C))

(Enter) key

to stop automatic number sequences.

4. RUN Program. Various problems may be encountered in this simple two line program. Overcome obstacles with

experience.

PROGRAM CODE LISTS. Write

Read the Programming Manual). The order of the coding statements do not follow the alphabetical or functional

presentation of manuals. Organize computer programs in steps.

Computer Program to Display Data. First time experimental models use only a few computer commands to be

successful.

Screen Print. Print simple messages on screens or line printers (See Message Prompt Display). Comply with program-

mers manual provided with computers or DOWNLOAD. Group computer program commands and statements, or

prompts, inputbox and msgbox (See Program Statement Groups). Evaluate the number of code lines required for a

program by subtracting starting from ending line code number. Programs may be a long list of code lines.

How to Find Program Code Files. Select FILE or special function keys (F) in Qbasic or Gwbasic. OPEN programs.

"ENTER YOUR MESSAGE, PLEASE"

100 DISPLAY "ENTER YOUR MESSAGE, PLEASE"

100 PRINT "ENTER YOUR LANGUAGE, PLEASE"

200 PRINT "MODEL PROGRAM "

300

Page 7: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 329

RUN Programs. Highlight or key in RUN. Select (Enter) keys.

Descriptive Messages on the Screen. Messages are essential for program models.

Input Prompt Statements. Request program model input.

Msgbox. Provide tutorials. Display notes in program computer msgbox and inputbox input prompts. Use quotes ( " " )

to put in messages.

Keyboard Data. Accept data from keyboards with Input statements. Ask for input files.

Select Special Service Database. Create Database input test files.

Test File Input. Take time to document procedures to open data input files for this computer model. Show data from

files on screens with Display or print program statements. Computers quickly perform operations on data item fields

defined as numeric. Embellish numeric results with alphabetic descriptions and graphic emphasis on screens.

Special Characters for Computer Commands. Characters are not used the same as in grammatical contexts.

Name Designation for Character Field. End mnemonic names for alphabetical data field message with

the dollar sign

special character ending.

Compilers may indicate that changes are needed to RUN the first program. Change mnemonics. Add extra special char-

acters for alphabetic data.

LIST Programs Just RUN. Add one line of program code at a time. Add lines on the end of program code lists.

Gwbasic. Add sequence numbers. Enter commands after the sequence numbers

Qbasic. Add a blank line after the (Enter) key is selected.

Insert. Add two additional code line numbers, 300 and 400:

(or inputbox and msgbox)

Key in RUN and (Enter).

Input Prompt.

Use input message (or inputbox) prompt. Expressions in statements are in quotes. Program stop executing commands at

program line numbers 300. Enter alphabetic data messages for a

field through the keyboard.

Display Message. Display data from the message$ field on msgbox screens. This computer model is simple but com-

plete. No Lists Are Stored on a Disk File. No disk file is opened on which to save the message. Data is lost when the

program is done.

SAVE NEW DOS BASIC TEST DATA ON DISK (NO DATABASE FORM).

Save Data Input in Files. Choose disk drives that are in the system configuration and then choose a name for files.

Examples to Save Data with File Names. Store data in files. Open output files.

dollar sign $

parenthesis ( )

double quotes " "

and comas , ,

$

message$

300 INPUT "ENTER THE MESSAGE:";MESSAGE$

400 PRINT "this is the message:";MESSAGE$

message$

Page 8: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 330

1. Relative File Data Input Statements (Program Code List #1 and #2).

Program Code List #1

2. Sequential File (Hockey Database Convert Code List #3). These statements are part of a larger program.

Give instructions from the keyboard on the next data step to enter data to update either of the two files.

Modify Programs. Use additional filename$ item statements.

BASIC PROGRAM SAVE OPEN FILES.

Program Statements.

1. Open disk files as output files to store data.

2. Enter and save (print) data lists.

3. Save data entered (or from http://) through a program (print output #) for later reference, even after the

computer power is turned off.

DATA STORAGE STATEMENTS.

(DOS or TI99 or WINDOWS).

Define Alphabetic or Numeric Data File Item Fields. Program statements are terms underlined. See Program State-

ments section for definitions.

1. Open File For Program. Include "input" or "output" or "random" and directory associated with file names. File

numbers relate to statements to creation, or retrieve files. Use len in Visual.

2. Write, Print or Put Record for File. File number is the same as in open. Define fields (Rows of the special servic-

es).

3. Record Field. Define random file data buffer. Item field are for DOS Basic. File number is the same as in open ran-

dom.

4. Type Record. Visual Basic Random File. Define data item fields.

5. Input File. Use Get or input with the same data item fields defined in the service used to create the input file. Use

the same file number in the input and open input statement.

6. Output File. Define fields. Use the same file number in open output and in the print or write.

7. Close File. Use (EOF) end of file to branch to close statements. Choose the same file number as in open statements.

8. Goto. Enter lists of items into data file records with goto statements.

CREATE OR COPY DATA FILES.

Enter Keyboard Data Input.

1. COPY data from http://

2. Get data from keyboards.

Input statements can be in any part of programs. Follow with print or write statements. Write disk files on floppy disk.

Store data in disk directories. Convert data files to relative file. Read file.

Subdirectory. Make subdirectories for data files. Group files into categories on Gold Star 316 or MEMBER directory.

filename$ = "b:\ch08\randfile"

500 OPEN "r", #1, filename$

FIELD 1, 20 AS list$

600 INPUT "enter list "; message$

700 IF message$ = "end" THEN 1000

LSET list$ = message$

PRINT #1, list$

cnt = cnt + 1

800 PUT #1, cnt

900 GOTO 600

1000 CLOSE #1

Print "count " , cnt

Page 9: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 331

Choose the same directory or floppy disk to read data lists into the next program.

File Name. Acronym includes name of disk drives (or web http:\\) in any computer. Set the name of data file to a file-

name$ acronym. Filename$ is then equal to a data file. Choose mnemonic names for files in the system. Make names

easy to remember so that data files are easier to retrieve from a directory.

Basic Program Model to use Data File for Input. Use computers to an advantage. Scan disks to find files. Find

directories. Find the right file names. Easily retrieve and review data from one or more files. Read files (database.tex)

from a subdirectory (CH08) on specified disk drive (B:).

Retrieve Data from Disk. Read files one record at a time until the last record is reached and an end of file EOF mark.

Retrieve all data records. Print data files stored on disk with new programs.

DATA FILE FROM KEYBOARD INPUT

Program Code List #2

COPY (.html) or Database.

COPY Program Code. Enter programs into new computers.

RUN Programs with File. Enter file names in inputbox prompts as input files. Open input statements use files with

names copied from filename$ as in Program Code List #2.

Display. Read data lists placed on files and review.

1. Print. Tab a data item to column 20 on a screen.

2. Msgbox. Use screen.

Convert. Create relative files from sequential files (Program Code List #2).

COPY AND IMPROVE SYSTEM.

Computer Data. Use long term memory jogging messages to retrieve data quickly. Efficiently use language (See

Chapter 4, Lang. #1), or other application program models. Choose words in messages or FAVORITE SITES. Review

relationships between lists for various foreign languages studied.

B:\CH08\DATABASE

filename$ = "b:\ch08\database.tex"

filename3$ = "model.dat"

PRINT "program2", filename$

OPEN "r", #3, filename3$

FIELD 3, 20 AS list$, 10 AS color$

500 OPEN "i", #2, filename$

listnumb = listnumb + 1

600 IF EOF(2) THEN 1000

cnt = cnt + 1

INPUT #2, l$, c$

LSET list$ = l$

LSET color$ = c$

PRINT #3, list$, color$

700 PUT #3, cnt

800 PRINT TAB(20); l$

900 GOTO 600

1000 CLOSE #2

CLOSE #3

PRINT cnt

END

Page 10: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 332

Convert Database Files. Select Database services to take files and create ASCII sequential files for Basic data process-

ing systems (See Program Code List #2).

Create Program Input Files (i.e. terms). Verify (.html) data in Spreadsheets visually. Easily review sequential data

files created and edited by an Editor. Create new files. Write one record after another on disks under subdirectories.

RUN A BASIC PROGRAM WITH A DATABASE INPUT FILE.

Transfer (http:) Data and Code Files from MEMBER Directories. E-Mail.

Print Data from Files with a Database. Convert (.dbc) to (.doc)

SWITCH FILES PRINT

"1993 Hockey Conversion Files"

Hockey Database Convert Code List #3

Create Files on a Specified Subdirectories. Use the same disk drive for input into the next program. Follow open

statements with input statements. See both Program Code List #1 and Program Code List #2. Get data lists from files.

Compile with Javac. RUN Java.

Applet to Show Java input #1

MOUNT CORRECT DISK. COPY URL.

Input File. Files can not be found on the wrong subdirectories or floppy or hard disks. Only lists of files on appropriate

subdirectories are recognized by the next program. Java uses capitals.

Qbasic Service Input File. Simple programs print lists of names of hockey team database files (See Chapter 6, Hockey

Tables).

Create Files and Display Data. Display and Print files.

1. Use lprint statements.

2. Select Qbasic PRINT.

3. Direct DOS > to prt files to printers.

Correct File. Program line sequence numbers are optional in modular Qbasic programming. Improve Computer

Report. Edit or otherwise change computer systems, Web pages and programs. Change and redo book reports for better

grades.

MAIN Menu. Create DOS PROPERTY items or WINDOWS icons.

Select Programs from MAIN Menu or RUN. START programs on subdirectories automatically. Choose and RUN

list phone programs (Chapter 5) from screens with the mouse.

CHANGE DATABASE INPUT FILES INTO BASIC PROGRAM MODELS.

Change File Name in Model. Change software, drives or names of (.html) data files.

Software Input File. Select a software program. Open a data file. Change or add data item fields to records in files.

OPEN "i",#2, "b:\hockey\team.doc"

DO

INPUT #2, team$

PRINT team$

LOOP UNTIL (EOF(2))

END

import java.io.*;

system.out.println(" ")

try

FileInputStream inputStream =

new FileInputStream("x.java ");

catch

Page 11: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 333

CHANGE MODEL FOR NEW DATA INPUT FILE.

Data Item Format. Modify programs at will, depending upon the desires of the students using the systems. Match

names of software file EXPORT operations and program open file name statements exactly. Adjust models to fit situa-

tions. Match software file formats. Change program models to open data input files. Define data item fields in programs

in the same order as record data item field layouts. Data item field mnemonics do not have to be the same length as

numeric or alphabetic designations. Either rewrite old files or define new files. Define new files for either service.

Choose new mnemonic names in programs to read new file names. If outdated old files are read, the latest update is

missed. Change data list report organization as progress is made.

Programs in a Series. Computer systems are collections of programs. Some programs are independent and do not

depend upon other programs or files.

Old Data File. Other programs must open previously created data file lists. Programs act upon files by retrieving them.

Perform some type of data processing operation such as bypassing, marking, or otherwise changing data on lists con-

tained on files.

New Data Files. Take time to collect and enter data. Even though computers are very fast, all the data may not be put

into the computer system at once. Use a history. Build better models with more precision. Include a larger universe of

data lists. Perfect computer models. Complete data processing operations.

PROGRAM STATEMENT GROUPS.

1. Open and Close Data Files. Open, close, and check model data input for the end of file (EOF). (See Coding

Analysis B, C, D).

2. Conditional Branch. Read and check data code. Determine which section of program code to use for a goto state-

ment. Perform different operations with each routine goto branch label. - Add counters. Then add codes to DIMen-

sion lists.

Print on the screen.

Close the file and end the program.

3. Match Values and Attributes. Use the If statements with comparing symbols. Compare codes with data. (Se-

lect Database CRITERIA or FILTER menu terms).

After comparing, use goto or then in statements to branch to statement labels (See Coding Analysis F).

4. Calculate. Use the mathematical annotation to add

in count statements. Count record number indexes or items in a DIMension array.

5. Memory Array Lists. Store item lists in DIMension statements (See Coding Analysis A). Enclose the number

of the item in a list indicator between the

One Indicator Data Index List. Use linear one DIMension list to process data. High resolution graphics fig-

ures use one DIMension. An example is:

Exact equivalent matches =

Greater than symbol >

Less than symbol <

addition symbol +

left parenthesis (

right parenthesis )

list$(a)

Page 12: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 334

Two index indicator. The two DIMensional statement is less frequently used.

An example is:

6. Hard Copy Screen Output.

a) Print. Lprint or use a service for ASCII data.

b) Screen. Display text data in a portion of the screen on any of the lines from line 1 to line 24 with View

Print To.

c) Msgbox Dialogue Box.

7. End Processing. The end statement ends a program.

8. Aid for Program or Web.

A. Consult computer manual or disk aid index. Search a table of contents for the author's Web topics.

B. Select Qbasic help for statements. Search the index for the term.

Research Manuals. Review different programming command topics.

BASIC PROGRAM OPEN FILES STATEMENTS

OPEN DATA FILE AS INPUT.

Locate or Create and Store File. Open statements create new files or locates and retrieves old computer files.

Open File on B:. Open statements cover the two completely different aspects of computer input or output process-

ing.

Make Subdirectory. Make disk subdirectories (MKDIR).

Model Input Statement. Open files for input. COPY files from disk with one name to another file name. Use data

from the internet.

A. Read data in open input to use input disk files (See List #3).

B. Establish the number of items in lists to process. Read until the end of file (EOF) mark.

C. Enter input. Enter data through the keyboard.

Choose Old File Format. Old file are already in a subdirectory that has been made.

1. Open Input. Computer programs open one file as open input. Read input file records. Data item fields of input

files are already specified.

2. Memory Lists. Move old data from input files to DIMension arrays. Match input data against DIMension ar-

rays.

3. Java Streams. Use class.

4. Create New Data Files. Open Output. Use different program logic to store processed data files. Open new

files with open output statements. Be careful. Basic or Gwbasic gives no warning to replace any old file. Write

data from DIMension statements to output files. Store data by copying data to data item fields in records. Create

new output files to save. (See List #1 and List #2).

PRINT. DISPLAY OUTPUT SCREEN.

Qbasic. Print statements either send data to screens or to disk data records on files.

Visual Basic. Use msgbox for screens.

Specify the order of data item fields in output files or screens.

RELATIVE OR SEQUENTIAL FILE DIFFERENCES.

Java or Basic Program Models. Random or relative records are processed with keys. Sequential files do not have

keys. Review screens to determine which models will work.

Sequential Service File. Remove header records of data files created by special services. Open data files for Basic

programs. Choose and display data item fields of data input files. The line up of data fields in input and print or write

Group$(a,b)

Page 13: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 335

statements differ. When data processing problems occur in these areas, the computer is not always clear as to how to

resolve problems. Correct file definition if this is a problem.

ReRUN Problem Programs. Data input error messages are numbered. Check lists of diagnostic errors numbers to

help define problems to resolve. Program manual appendixes may help remove obstacles to complete file processing.

Processing of output files is generally more of a problem during reRUNs of old programs, rather than processing of

current input files. Use close statements when file processing is complete.

FILE CODE OR DATA PROCESSING USING GOTO STATEMENTS.

Data Arrays. Match input data against DIMension arrays.

Read Data. If a condition is reached, in the data file or screen, where new processing is to be done, go to a new code

line with the program goto statement.

MATCH DATA ITEM FIELDS FROM A RECORD ON FILE.

IF Statement. Manuals seldom clarify the importance of the if statement. Compare lists with the computer if

statement or on command. Test the value or attribute of the data items for the contents sought. Use the operation

over and over again in list processing.

Create New Files. Use this simple recursive operation to create new records on files.

COMPARE DATA ITEM LISTS.

If Statement to Match Words.

1. Data Item Field. The mnemonic data item field name is word$. The data field mnemonic name ends in a dollar

sign ($). The data field name is alphabetic.

2. Use Value or Attribute (in Quotes " ") to Compare.

Search for the word

Compare each data item in the data item field on the records in the file to :

Enclose the word (match) between quotes ("") for compare alphabetic items in a computer program.

3. Branch. GOTO New Module. Begin special processing to successfully compare items. Branch (on a goto)

from one program line number label statement to another, such as line 900 or 999. Line numbers are numeric.

Line numbers (or labels) are not enclosed in quotes.

MATCH VALUE USING IF

Numerical is not a reserved word.

4. Additional Condition. Larger computers use the programming term then to change values in a data switch.

Apply Boolian algebra in the while statement.

Upper and Lower Case Letters. Different ASCII character codes are assigned to capital letters than are

assigned to small letters.

Spaces in a Phrase. Place spaces in a data item field on a record properly. Otherwise a match for a phrase or a

string of other characters is not made. Change the characters until an exact match is made.

If word$="match" then 900

match

"match"

If numerical = 33 then 999

Page 14: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 336

Symbols to Compare Data in Fields. Use symbols in the statements to compare data between data fields.

Reserved Compiler Words. Reserved words may differ from compiler to compiler. Check the list of reserved

words that the compiler uses. The computer manual describes the uses. Words such as count, number, integer,

line, page and so forth have special uses. Reserved words cannot be used as data field mnemonics or in program

statements to compare numeric or alphabetic items. Otherwise, difficulty is encountered when the program is

RUN.

Code Branch Condition. The goto statement guides the program processing to new routines with other computer

program code line instructions.

Include a series of tests for special data value or attribute codes.

Count the number of records for screen or page lines.

SET AN ATTRIBUTE IN MEMORY. Data and Equal Sign. The equal symbol serves another important function

besides mathematical statements or equations. Set or initialize values of data field attributes in computer memory

with equal symbol and quotes.

Place a Value in a Data Field.

Set the data field called hold$ to a string segment attribute of "top".

Use the equal sign

to set the data field to another value.

Equal Statement to Set Value.

The data field hold$ now contains the attribute string segment value "BOTTOM" in capital letters.

Change the Value in the Field.

Use the value in the field to change attributes in other data fields.

Take the value from a data file and place in the data field.

Write this field to a disk.

Use the value to compare or print on the screen.

Use while - wend or do until loop instead of the goto in Qbasic. These statements are similar to Cobol perform.

DIMENSION ARRAY GROUPS. READ ALL DISK RECORD DATA ITEMS INTO THESE LISTS IN

MEMORY.

Hold Values in Lists. DIMension statements associate each item in a list with a DIMension list number (n). Define

each DIMension array. Choose data item list counters. Set the maximum number of items in each list (i.e. Dim

(9999)). Store data items values or attribute lists in each DIMension statement in memory.

Dim (999) Example. Store a list of one hundred or less.

GREATER AND LESS THAN

Greater less

than > than <

symbol symbol

The equal

=

symbol

Hold$="top "

=

Hold$="BOTTOM"

Dim holding$(100)

Page 15: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 337

1. Set holding$(1) to "first":

2. Set holding$(2) to "second":

3. Set holding$ () to the values from the rest of the list until all one hundred of the values are stored.

DIMENSION LISTS FROM FILE.

Read Data File. Store data from the input files in the DIMension statement. Count the maximum number of record

items to be read from each file. Set the number of items in each data array to this number. Computers can store the

maximum number given, but can operate on less than the number specified (See Save A Value In Memory). Test data

fields for a length of zero to eliminate items with no data from the array.

ITEM OR RECORD COUNTER.

DIMension Item Counter. Choose a counter for each data item. Increment regularly by one. Increase the value of

the item counter in the statement:

DIMension Array. Define a data field in the program:

Program Routine Statements. Compare data in a DIMension array for each data item one by one. Read a data item.

Increase the number in a DIMension data field name. Compare. Retrieve the entire list of one hundred items. Display

the values in the holding$ list. Repeat Routine Counter. Compare several arrays. Repeat some routines over and

over.

STRING SEGMENT STATEMENTS. Characters. Investigate each letter of a data field. Check ten characters in

a data item.

For - Next Statements.

Count to Ten. Set i from a low of 1 to a high of 10.

Investigate Ten characters. Check the first character when i is equal to 1. Check the tenth character when i=10.

Go to the next higher program code line number after the next i.

Process the new routine.

PRINT PROCESSED DATA.

Print Basic. Display data fields on screens.

1. Tab(). Place the first data item field a specified number of column character positions in the row or line.

2. Comma in Print Statements. Print data items in thirteen character columns. Scroll data item lines off of

the top of the screen, when the last line on the bottom of the screen is reached.

3. Locate and View Print. Position lines of data on screens in rows and columns. Stipulate X and Y coordi-

nates. Print data items.

Visual Msgbox. Use dialogue box with & " " connectors.

Holding$(1)="first"

Holding$(2)="second"

counter= counter +1

Holding$(counter)

For i=1 to 10

Next i

Page 16: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 338

PRINT DATA ON PRINTER.

Lprint. Print the data item fields on the printer.

DOS GRAPHICS Command. Print graphics images from the screen. Grab.com of Wordperfect program can

capture screen images and send an image to a disk file.

Database. Select a FORM.

STOP PROCESSING END STATEMENT.

Finish. All the data on files or lists have been processed. End statements indicate that all program code instructions

have been executed.

INTERRUPT PROGRAM PROCESSING.

Trace. Trace lists the program code lines numbers (for Basic and Gwbasic) used for processing. View the screen

output while reviewing the program coding being executed. The QBasic TRACE emphasizes the line executing in

bold.

Basic Stop Statement. Stop the RUN. Review the program listing in the meantime. Determine how the data records

are being processed in the program. To continue processing, enter

or

Other. Depress ((shift)(alt) (Del)) keys. Cancel compilers.

Watch. Debug programs.

PROCESS REPETITIVELY.

Recursive Code. All computer programs merely apply the same basic concepts over and over again with some rather

minor modifications or adjustments from program to program. Master the basic concepts.

Convert Model Operation. COPY old or construct new models to solve problems. Sketch general flowcharts of old

systems. Develop on the new machine.

Learn new:

Programming language instructions.

Computer system commands.

Software tutorial menu terms and icons.

Move application programs between computers or compilers, partially to allow improved additional features to be

used. The main program code remains the same.

New Basic Features. Apply detailed programming code changes to new computers. Make small changes in the pro-

gram commands in open statements, graphics screen mode statements, and in string segments data field editing spe-

cial characters. Improve operation on the new system. Code Basic program commands. Uncover significant prob-

lems.

BASIC PROGRAM MODELS AND DATA FILE.

Apply General Models. Develop specific project models on one computer.

1. Use communication devices such as modems, with telephone lines. Select internet files. Use File Transfer

Protocol (FTP).

2. Use published lists of computer programs.

3. Use DDE or SQL.

Transfer Programs. COPY as (.html). Transfer computer programs to other computer compiler or system.

COPY PROGRAM CODE.

1. New System. Lay out systems for new computers. COPY programs from program listings, from other computer

disks or from text disks. Use applet tags in (.html) document web pages.

2. FTP. Transfer programs or program documentation. Keep the number of pages to a minimum for low transmis-

sion time.

NEW SYSTEM DESIGN.

Write Programs from Scratch. If two computers are not at the same physical room location, with the same

cont continue

Page 17: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 339

compiler, an alternative is to rewrite programs or COPY from a HOST.

Transfer Data Files. Transfer software data (.html) files. Transfer Unix files to host. FTP with Explorer to compati-

ble computer software.

Copy Disks. Choose files from other computers, if the disk density is the same. Multi-tasking computers have higher

density drives than simpler computers.

DATA FILES FOR INPUT.

Software to Create Files as Required. Use a minimum number or keystrokes. Enter lines of data codes. COPY

(.html).

Program Models.

1. Sample Test Files. Write program models from the input output sections of computer or programming manuals.

Create simple data input files for Basic models. Write program models to open an input data file created by soft-

ware. List files. Test (See Program Code List #1).

2. COPY APPENDIX MODELS. COPY (.html) internet APPENDIX Basic program sample models. PASTE on

laboratory disk systems. Apply the logic to any computer.

aol.com Visual Basic

freenet.org Gwbasic

1. BLOCK and COPY Qbasic and Gwbasic programs in laboratory document. SAVE program text with (.bas) or

(.xls) file extension.

2. Remove all typeset marks and remarks before using compilers.

3. Review programming or software manuals for more computer operation details (See Programming Statements).

4. Write more complicated matching programs over longer periods of time.

Copy Java Sun SITE or CDs.

RUN PROGRAMS.

Use simple logical steps in programs. Select RUN. RUN successful models on the first attempt to experience a satis-

fying exercise.

Review Program Listings. Review program listing documents from old computers. Review program logic. Use list-

ings with clearly visible special characters printing. If listing are easy to read then easily enter program models in

new computers quickly.

Data Input File Error.

Floppy Disk. Mount correct WORKBOOK laboratory disks.

Special Services File. Program models may not RUN to program ending if subdirectory acronyms or file names are

incorrect. The program stops at the file name, if the file name is not correct. Change file names and subdirectories in

copied program statement to correct the problem.

Data Files in RUN. Collect and review model data and document material on files.

Special Services Header Record. The header records (<h) are not data. Delete a header record. A header record

that is not deleted from special service data input files causes data input file problems. Refer to data on special ser-

vices data files.

Verify. Data on input files may be incorrect. Verify and correct data input files. Develop techniques to verify the

accuracy of input files for any program compiler selected. Program model execution may terminate because of data

processing coding error.

Data Item Fields. Basic program data is on records in data item fields. Define the correct number of data item fields

in proper order in input statements. Commas delimit data item fields from a DOS special service file. Remove

inappropriate commas in data fields to solve problems.

SEVERAL FILES IN ONE PROGRAM.

Create Data Files. Create one by one over a period of time on WORKBOOK directories. RUN list processing

program to view input files created. List files.

Combine Several Files. Use several files in a Database.

Page 18: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 340

Identify Model Data Reports. Use routines or modules to read data files. Print program names and data files on the

first line of the report. The Qbasic Editor displays the program name on the code listing on the screen. Laboratory

models print the program name in the program code listing.

Compare Files. Compare files and match model data. Use various techniques to match files in routines. If a com-

puter system is upgraded from DOS 4.0 to DOS 5.0 because of a new hard drive, the programming statement aid

tutorial index is provided in the software.

DATA ERROR.

Correct Model Report Errors.

Correct Database. ReRUN. RUN several programs

Causes for Data Error.

1. File names may be incorrect. Change file names.

2. Data item program code errors can occur in using data in DIMension arrays.

Check Program Manual. Basic programs do not RUN with incorrect data files.

Solve Data Item Errors. CDs or manuals arrange computer commands in alphabetic order. Keep programming

manuals available. Sometimes technical descriptions, or Java methods, in manuals are too complicated to digest in

order to apply to current situations in a timely manner. Review specific terms in each section. Some difficulties may

arise because computer manuals are not written to determine exact causes of program termination.

Document Problem Resolution.

Present material in logical order, rather than in categorical alphabetical order required by programming manuals to

easily comprehend.

DEBUG. Compilers find keying mistakes that are easily changed. Select AID. Program terms are indexed by subject

in Qbasic.

1. Process Input File Data. Process material and data. Select special terms to process data files for software.

2. Process Data with Model Program Statement Terms.

3. Data DIMension Arrays. Repeat program routines. Branch to subroutines with GOTO.

4. Graphic Simulation. Store figures for graphic simulation programs in DIMension arrays. Group graphics

program commands listing found in manuals. Draw figures by lines, circles, or character bits. Use these

Graphics in model simulations. Use geometric X and Y coordinates and higher screen resolutions terms. The

graphics model can reward the person making the correct responses.

PROGRAM CODING STATEMENTS.

Write Program. RUN simple operational programs. Apply creative thinking to use simple routines in more ad-

vanced program coding applications. Analyze data. Add graphic lines. Improve computer performance.

Update Program. Change logic of new or old programs. Upgrade programs over time. Insert code lines. Add code

line to ends of programs. Add subroutines or modules. Change Java classes. SAVE both programs on disk. SAVE

programs as NEW programs, even if program logic has been changed only slightly. Use the latest up to date program

code list.

Model Backup. SAVE processing logic from old programs on the web, in case system reRUNs are needed. COPY

from the Web if a program has been deleted or is missing. Use printed program listings. Reenter the needed program

entirely.

KEYBOARD SPECIAL FUNCTION KEYS AND SYMBOLS.

Function Keys. Twelve special function keys are across the top of the keyboard.

Gwbasic assigns special functions to each of ten keys initially. Select function (F) keys for Qbasic special functions.

F1, F2, F3, F4, F5, F6, F7, F8, F9, and F10

Page 19: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 341

Use control keys in combination with other keys.

Special services use lettered function keys extensively.

ASCII Codes Tests. ASC code used in special function keys such as (directional arrow) keys change from one

computer to another. ASC values for directional keys are:

Numerical attributes assigned to special functions keys may differ. ASC codes assigned to alphabetic keyboard

characters remain the same.

FTP. Use Unix FTP internet files. See internet #3, Chapter 11, internet #4. Transfer files with computer modems,

Kermit, Xmodem, or Ymodem and certain other formats.

Enhanced Resolution. Enhanced VGA Graphics print more image characters on a line of the computer screen. Add

program instructions to print more material on line printers.

COMPUTER BASIC PROGRAM STATEMENT DIFFERENCES.

Text TI99 to DOS Conversion.

Basic Program. Small program statement differences exist between DOS, Applesoft and TI99 compilers. Changes

are consistent. New compilers usually pinpoint differences. Determine the differences. Then change program line

commands.

Texas Instrument Programs. File number is followed by a pound sign and colon

Basic to Gwbasic removes colons in some record input statements. Program compiler conversion from TI99

instances.

Connector Symbols Change. DOS Gwbasic program code models use different special connector symbols than

TI99 Basic in listings. CONNECTOR.

DOS. Use plus sign

instead of

TI99 ampersand

INPUT STATEMENT.

DOS. Use comma

instead of

TI99 colon

MACINTOSH FOLDER.

Macintosh. Use slash

instead of

DOS directory backslash

Character Connectors. Connect characters, letters or other string segments with connectors symbols.

String Segment Changes. Obtain string segments from verb infinitives. Use mid$ in DOS instead of TI99 seg$ st-

atements. Connect verb ending identifier to stems using a connector. Display these connected string segments on

screens.

TI99 8, 9, 10, and 11

DOS 11, 12, 13,and 14

#:

+

&

,

:

/

\

Page 20: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 342

Verb Stem Changes. RUN programs to update.

Program Instructions Changes.

TI99. Use call key.

DOS. Use locate. The DOS 4.0 mouse positions the cursor.

Use directional arrow keys. Change any characters. Copy alphabetical letters characters of data fields.

Basic Manual Program Model Changes.

Code Line Changes.

1. Gwbasic requires code line numbers.

2. Qbasic uses modular code line techniques.

Term Changes. Use print program statement on Gold Star 316 computer compilers.

GOLD STAR DOS SCREENS. Resolution.

Gold Star 316 uses twenty four rows.

1. Low Resolution. Place characters in columns one (1) through forty (40) across screens.

2. High Resolution. Place eighty characters (80) on screens (See Graphics Statements).

Locate Y And X Coordinates. for Computer Graphics. Programming commands change completely as technolo-

gy advances. Graphics are in program logic. Screen layouts are easier to format with graphics commands of larger

computers.

Locate Coordinates for Text. Position cursors on screens with locate commands. Place text data item at specified X

and Y coordinates. Locate (X, Y) is limited to placing text characters on screens. Place text characters in row one (1)

to row twenty four (24).

VISUAL BASIC MODULE.

Select Microsoft Excel menu.

Enter prompt: or title: to display text on the screen.

COPY as (.html). FTP.

TI99 SCREEN COMMANDS.

Call Hchar or Call Vchar. Simple screen layouts are on older computers. Put cursors in proper x horizontal and y

vertical axis. Use simple screen layouts to avoid screen clutter.

1. Analyze each key letter placed on the screen from the keyboard with the Call Key command.

2. Put one character at a time on the screen with the call hchar(Y,X) statement. Use twenty four (24) rows and

thirty two (32) columns on the TI994A. There is no difference between placing text or char defined graphics on

the screen.

3. Remove the cursor by placing a space in the cursor position.

DOS Mouse. Position a mouse cursor with the locate command for Gwbasic. The Gwbasic DOS 4.0 locate

command requires a ? and a space character position on the screen to be counted when used in conjunction with the

input statement. Consider this to accept data displayed on the screen with a mouse to update a file.

Clear Screen Commands. Clear clutter from viewing window areas screens.

TI99. call clear.

DOS. Cls.

Java. paint.

MAIN MENU TO SELECT PROGRAM.

Program Code. Create program names on menus for Gwbasic or Qbasic program applications on MAIN menus.

Highlight programs from FILE. RUN programs.

Qbasic to Review Subdirectory Program List. Navigate directories with Qbasic Editor. Move the cursor with

(TAB) keys to locate and highlight subdirectories. Find lists of all programs in subdirectories. Search for (.bas) file

extensions. Choose programs from directory lists of files with (.bas) extensions. Highlight appropriate program

names listed with the cursor and RUN (F5).

Review Data File Lists. Search for data files in subdirectories with Editor. Give file extensions of data files.

Page 21: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 343

Summary. Computer models presented are an initial step. Learning how to operate computers while achieving goals

is a rewarding experience. Put simple computations or simple graphics programs into computers. RUN programs on

a one time basis. Program and data are lost when power is turned off, unless a backup device, such as a disk, is

attached to systems. Programs can be erased or deleted on purpose.

COPY WEB FILES.

Sign on to Internet. Find a Web Page and Navigate. Go backward and forward through Hot links at a Http:// loca-

tion web site. Use FAVORITE BOOKMARKS. Refer to interesting locations. PRINT material.

Wordperfect 7. Create (.html) files. Quattro Pro creates spreadsheets.

Copy Material to Laboratory Disks. Transfer Graphic (.gif), and spreadsheet and text (.htm) files over the intern-

et. Use a HOST computer SITE or MEMBER web directory.

FILE New Web Browser New Mail Message

Mail Document Open Location

Open File Save As

Upload File Page Set Up

Print Print Preview

Close Exit

EDIT Undo Cut

Copy Paste

Select All Find

Find Again

VIEW Reload Reload Frame

Load Images Re Fresh

Document Source Document Info

GO Back Forward

Home Stop Loading

File\\A\ch01

BOOKMARKS Add Bookmarks Go To Bookmarks

OPTIONS General Preferences Mail and News Preference

Network Preferences Show Toolbar

Show Location Show Directory Buttons

Show Java Console Auto Load Images

Document Encoding Save Options

DIRECTORY Search Member Directory

Ameritech Yellow Pages

WINDOW Netscape Mail Netscape News

Address Book Bookmarks

History 0 Netscape/File A/CH01

HELP About Netscape About Plug ins

Release Notes Ameritech .Net Users G Ameritech.net FAQ Ameritech.net Support

Page 22: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 344

SITE:

SPORTSERVER

LINKS

BASEBALL

BASKETBALL

FOOTBALL

HOCKEY

THE SPORTS PAGE

SAVE AS.

Use Quattro Pro to save as an

Excel file for Basic.

PLAYER,AVG,OBA,SLUG,G,AB,R,H,TB,2B,3B,HR,RBI,BB,SO,SB,CS,SH,SF,HP

Toronto Blue Jays Team Statistics,,,,,,,,,,,,,,,,,,,

R.Perez,0.327,0.311,0.332,86,202,30,66,82,10,0,2,21,8,17,1,2,6,1,1

Nixon,0.286,0.377,0.327,125,496,87,142,162,15,1,1,29,71,68,54,13,7,0,1

S.Green,0.28,0.342,0.448,132,422,52,118,189,32,3,11,45,33,75,5,1,0,2,8

Olerud,0.274,0.382,0.472,125,398,59,109,188,25,0,18,61,60,37,1,0,0,1,10

C.Delgado,0.27,0.353,0.49,138,488,68,132,239,28,2,25,92,58,139,0,0,0,8,9

Brumfield,0.256,0.316,0.448,90,308,52,79,138,19,2,12,52,24,58,12,3,1,3,4

Samuel,0.255,0.319,0.457,69,188,34,48,86,8,3,8,26,15,65,9,1,0,1,3

J.Carter,0.253,0.306,0.475,157,625,84,158,297,35,7,30,107,44,106,7,6,0,6,7

T.Perez,0.251,0.311,0.332,91,295,24,74,98,13,4,1,19,25,29,1,2,6,1,1

Sprague,0.247,0.325,0.496,159,591,88,146,293,35,2,36,101,60,146,0,0,0,7,12

Brito,0.238,0.344,0.363,26,80,10,19,29,7,0,1,7,10,18,1,1,2,0,3

Obrien,0.238,0.331,0.41,109,324,33,77,133,17,0,13,44,29,68,0,1,3,2,17

A.Gonzalez,0.235,0.3,0.391,147,527,64,124,206,30,5,14,64,45,127,16,6,7,3,5

Mosquera,0.227,0.261,0.318,8,22,2,5,7,2,0,0,2,0,3,0,1,0,0,1

S.Martinez,0.227,0.288,0.332,76,229,17,52,76,9,3,3,18,16,58,0,0,1,1,4

Cairo,0.222,0.3,0.296,9,27,5,6,8,2,0,0,1,2,9,0,0,0,0,1

Crespo,0.184,0.375,0.265,22,49,6,9,13,4,0,0,4,12,13,1,0,0,0,3

Stewart,0.176,0.222,0.235,7,17,2,3,4,1,0,0,2,1,4,1,0,0,0,0

Huff,0.172,0.2,0.241,11,29,5,5,7,0,1,0,0,1,5,0,0,0,0,0

PITCHING,,,,,,,,,,,,,,,,,,,

PLAYER,W,L,S ,ERA,G,GS,CG,SHO ,IP,H,R,ER,HR ,BB,SO,HB,WP,BK ,

Crabtree,5,3,1,2.54,53,0,0,0,67.1,59,26,19,4,22,57,3,3,0,

Guzman,11,8,0,2.93,27,27,4,1,187.2,158,68,61,20,53,165,8,7,0,

D.Johnson,0,0,0,3,10,0,0,0,9,5,3,3,0,5,7,0,0,0,

Spoljaric,2,2,1,3.08,28,0,0,0,38,30,17,13,6,19,38,2,0,0,

Hentgen,20,10,0,3.22,35,35,10,3,265.2,238,105,95,20,94,177,5,8,0,

Timlin,1,6,31,3.65,59,0,0,0,56.2,47,25,23,4,18,52,1,3,0,

Risley,0,1,0,3.89,25,0,0,0,41.2,33,20,18,7,25,29,0,1,0,

Flener,3,2,0,4.58,15,11,0,0,70.2,68,40,36,9,33,44,1,1,0,

W.Williams,4,5,0,4.73,12,10,1,0,59,64,33,31,8,21,43,1,2,0,

Hanson,13,17,0,5.41,35,35,4,1,214.2,243,143,129,26,102,156,2,13,0

Quantrill,5,14,0,5.43,38,20,0,0,134.1,172,90,81,27,51,86,2,1,1

S.Brow,1,0,0,5.59,18,1,0,0,38.2,45,25,24,5,25,23,0,2,1

Page 23: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 345

K.Robinson,1,0,0,6,5,0,0,0,6,9,4,4,0,3,5,0,1,0

L.Andujar,1,3,0,6.99,8,7,0,0,37.1,46,30,29,8,16,11,1,1,0

Janzen,4,6,0,7.33,15,11,0,0,73.2,95,65,60,16,38,47,2,7,0

Bohanon,0,1,1,7.77,20,0,0,0,22,27,19,19,4,19,17,2,2,0

J.Ware,1,5,0,9.09,13,4,0,0,32.2,35,34,33,6,31,11,2,6,1

Silva,0,0,0,13.5,2,0,0,0,2,5,3,3,1,0,0,0,0,0

Use three dimensional Spreadsheet. Cubs are used in tab A and Yankees in Tab B. Place the arrow cursor on the tab.

Select the ESC mouse key. Name the Tab Page.

Duncan 329

O'Neill 302

Eenhorn

Raines

Jeter 307

Williams;G 270

Leyritz 268

Boggs 313

Sierra

Fox 186

Girardi 300

Williama:B 297

Martinez 300

James

Luke

Posada

Internet #3, Sports Spreadsheet

Haney

Gomez

Gonzalez

Servais

Grace

McRae

Sosa

Hernandez

Sanchez

Sandberg

Timmons

Bullett

Kieschnick

Dorsett

Jennings

Player names were entered in small letters. Initial letters were capitalized and Imported into a Spreadsheet. Cub

players in tab B are May 5. Add Batting Average for Sept 8.

Grace 334

Mcrae 281

Page 24: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

Chapter 9 346

Gonzalez 277

Sosa 273

Magadan 264

Servais 264

Hernandez 248

Gomez 239

Sandberg 235

Timmons 216

Bullett 208

Sanchez 208

Sort batting averages and then add at bats.

Grace 334 476

Mcrae 281 549

Gonzalez 277 426

Sosa 273 498

Magadan 264 121

Servais 264 390

Hernandez 248 315

Gomez 239 335

Sandberg 235 485

Timmons 216 102

Bullett 208 144

Sanchez 208 231

Internet #3, Sports Spreadsheet

Page 25: Basic Data Programs - University of Michigan Dearborn

Basic Data Programs

415 Chapter 9