Atjaunināt sīkdatņu piekrišanu

QBASIC Fundamentals and Style with an Introduction to Microsoft Visual Basic 2nd Revised edition [Mīkstie vāki]

, (all of Purdue University Calumet, USA),
  • Formāts: Paperback / softback, 608 pages, height x width: 235x191 mm, Illustrations
  • Izdošanas datums: 10-Jul-2000
  • Izdevniecība: Course Technology Inc
  • ISBN-10: 0619016256
  • ISBN-13: 9780619016258
Citas grāmatas par šo tēmu:
  • Mīkstie vāki
  • Cena: 72,05 €*
  • * Šī grāmata vairs netiek publicēta. Jums tiks paziņota lietotas grāmatas cena
  • Šī grāmata vairs netiek publicēta. Jums tiks paziņota lietotas grāmatas cena.
  • Daudzums:
  • Ielikt grozā
  • Pievienot vēlmju sarakstam
  • Formāts: Paperback / softback, 608 pages, height x width: 235x191 mm, Illustrations
  • Izdošanas datums: 10-Jul-2000
  • Izdevniecība: Course Technology Inc
  • ISBN-10: 0619016256
  • ISBN-13: 9780619016258
Citas grāmatas par šo tēmu:
Besides introducing users to the correct way to design and write programs by means of structured and top-down techniques, this book presents fundamental topics concerning computers and programming that should be covered in any introductory programming course.
Preface viii
Notes to the Student xv
List of Programming Case Studies
xvi
Computers and Problem Solving: An Introduction
What is a Computer?
1(1)
Advantages of a Computer
1(1)
Disadvantages of a Computer
1(1)
Computer Hardware
2(2)
Input
3(1)
Output
3(1)
Main Memory
3(1)
Auxiliary Storage
3(1)
Central Processing Unit (CPU)
3(1)
The PC Family
4(4)
Keyboard
5(1)
Monitor
5(1)
CPU and Main Memory Unit
6(1)
Auxiliary Storage
7(1)
Network System
8(1)
The Stored Program Concept
8(1)
Computer Software
8(4)
The Internet
10(1)
The Operating System
10(1)
The Graphical User Interface
11(1)
The Compiler and the Interpreter
12(1)
Problem Solving and Program Development
12(4)
Flowcharts
13(1)
Pseudocode
14(2)
Additional Information on Personal Computers
16(1)
What You Should Know
16(1)
Test Your Qbasic Skills
17(2)
PC Hands-On Exercises
19(2)
QBasic: An Introduction
Creating a Qbasic Program
21(3)
General Characteristics of a QBasic Program
21(1)
Keywords
22(1)
Variable Names and Constants
22(1)
Arithmetic Operators
23(1)
The PRINT Statement
23(1)
The END Statement
23(1)
Some Relationships between Statements
23(1)
The Input Statement
24(4)
Input Prompt Message
26(2)
The Print and CLS Statements
28(1)
Clearing the Screen---The CLS Statement
29(1)
Coding and Documenting
29(3)
Coding Techniques
29(1)
Documenting a Program---The REM Statement
30(2)
Program Flowcharts
32(1)
Multiple Statements per line
32(1)
Getting Acquainted with the QB Operating Environment
32(3)
Starting a QBasic Session
32(1)
The QBasic Screen
33(2)
Dialog Boxes
35(1)
Terminating a QBasic Session
35(1)
Editing Qbasic Programs
35(2)
Executing Programs and Hard Copy Output
37(3)
Executing the Current Program
37(1)
Listing Program Lines on the Printer
38(1)
Listing a Portion of the Program on the Printer
39(1)
Printing the Results on the Output Screen
39(1)
Saving, Loading, and Erasing Programs
40(2)
File Specifications
40(1)
Saving the Current Program to Disk
40(1)
Loading a Program from Disk
41(1)
Starting a New Program
42(1)
The QB Survival Guide Online Help System
42(1)
A Guide to Writing your First Program
43(3)
What you Should Know
46(2)
Test Your QBasic Skills
48(2)
QBasic Programming Problems
50(5)
Calculations, Strings, and an Introduction to the Top-Down Approach
Introduction
55(1)
Constants
56(4)
Numeric Constants
56(1)
Numeric Constants in Exponential Form
57(1)
Type and Range of Numeric Constants
58(1)
String Constants
59(1)
Variables
60(2)
Selection of Variable Names
61(1)
Declaring Variable Types
62(1)
The Let Statement
62(3)
Expressions
65(8)
Formation of Numeric Expressions
65(1)
Evaluation of Numeric Expressions
66(1)
The Effect of Parentheses in the Evaluation of Numeric Expressions
67(2)
Construction of Error-Free Numeric Expressions
69(1)
Numeric Functions
70(1)
Rounding and Truncation
70(1)
Developing a Rounding and Truncation Procedure
70(1)
String Expressions
71(1)
Use of LEFT$, LEN, MID$, and RIGHT$ String Functions
72(1)
The Top-Down (Modular) Approach and the Gosub and Return Statements
73(9)
Top-Down Design
74(1)
High-Level Design
74(2)
Detailed Design
76(1)
Implementing a Top-Down Design Using Subroutines (Modules)
76(1)
The GOSUB and RETURN Statements
77(2)
Recommended Style and Tips When Using the Top-Down Approach
79(1)
More about Subroutines
79(1)
Flowchart Representation of GOSUB, RETURN, and Referenced Subroutine
79(1)
Nested Subroutines
80(2)
Stubs
82(1)
What You Should Know
82(2)
Test Your QBasic Skills
84(4)
QBasic Programming Problems
88(7)
Looping and Input/Output
Introduction
95(5)
Testing for the End-of-File
99(1)
The do and Loop Statements
100(3)
Selecting the Proper Do Loop for a Program
101(1)
Conditions
101(2)
The Read, Data, and Restore Statements
103(4)
The DATA Statement
103(1)
The READ Statement
104(2)
The RESTORE Statement
106(1)
The Print Statement
107(5)
Print Zones and Print Positions
108(1)
Representation of Numeric Output
108(1)
Representation of String Output
108(1)
Use of the Comma Separator
108(1)
Use of the Semicolon Separator
109(1)
Creating Blank Lines
109(1)
Use of the TAB Function
109(1)
Displaying Spaces --- The SPC Function
110(1)
Calculations within the PRINT Statement
110(1)
Using the Immediate Window
111(1)
The LPRINT Statement
111(1)
The Print Using Statement for Formatted Output
112(14)
Declaring the Format of the Output
113(1)
Format Symbol
113(1)
The Number Sign Symbol
113(3)
The Decimal Point (Period) Symbol
116(1)
The Comma Symbol
116(1)
The Plus and Minus Sign Symbols
117(1)
The Dollar Sign Symbol
118(1)
The Asterisk Symbol
118(1)
Formatted Character String Output
119(2)
The LPRINT USING Statement
121(5)
The Locate Statement
126(5)
What You Should Know
131(1)
Test Your QBasic Skills
132(4)
QBasic Programming Problems
136(7)
Structured Programming and Menu-Driven Programs
Structured Programming
143(2)
Control Structures
144(1)
Combining Conditions
145(1)
Top-Down versus Structured
145(1)
The If Statement
145(4)
Comparing Numeric Expressions
147(1)
Comparing String Expressions
147(1)
Values of Conditions
148(1)
Accumulators
149(6)
Counters
149(1)
Running Totals
149(5)
Programming Styles
154(1)
Implementing the Do-While and Do-Until Structures
155(1)
The WHILE and WEND Statements
156(1)
Implementing the If-Then-Else Structure
156(4)
Simple Forms of the If-Then-Else Structure
156(2)
Nested Forms of the If-Then-Else Structure
158(2)
Logical Operators
160(6)
The NOT Logical Operator
160(1)
The AND Logical Operator
161(1)
The OR Logical Operator
162(1)
The XOR, EQV, and IMP Logical Operators
163(1)
Truth Tables
164(1)
Combining Logical Operators
164(1)
The Effect of Parentheses in the Evaluation of Compound Conditions
165(1)
Data-Validation Techniques
166(3)
The BEEP Statement
166(1)
The Reasonableness Check
167(1)
The Range Check
167(1)
The Value or Code Check
168(1)
The Digit Check
168(1)
The Select Case Statement and Menu-Driven Programs
169(12)
Valid Match Expressions
172(9)
What You Should Know
181(1)
Test Your QBasic Skills
182(6)
QBasic Programming Problems
188(9)
Sequential Files, Paging Reports, and Control-Break Processing
Introduction
197(1)
Data Files
197(2)
File Organization
199(1)
Sequential File Processing
199(14)
Opening Sequential Files
199(2)
Closing Sequential Files
201(1)
Writing Reports to a Sequential File
202(4)
Flowchart of the OPEN and CLOSE Statements
206(1)
Writing Data to a Sequential File
206(5)
The INPUT #n Statement
211(1)
The EOF Function
212(1)
Paging a Report
213(6)
Paging Output on the Screen
218(1)
Control-Break Processing
219(11)
What You Should Knows
230(1)
Test Your QBasic Skills
231(2)
QBasic Programming Problems
233(8)
FOR Loops, Arrays, Sorting, and Table Processing
Introduction
241(1)
The For and Next Statements
242(11)
The Do-While Loop versus the For Loop
242(1)
The Execution of a For Loop
242(2)
Flowchart Representation of a For Loop
244(1)
Valid Values in the FOR Statement
244(1)
Stepping by I
245(1)
Stepping by a Value Other than I
246(1)
Initializing the Loop Variable to a Value Other than I
246(1)
Decimal Fraction Values in a FOR Statement
246(1)
Negative Values in a FOR Statement
246(1)
Variables in a FOR Statement
246(1)
Expressions as Values in a FOR Statement
247(1)
Initial Entry into a For Loop
247(1)
Redefining For Loop Values
247(1)
Exiting a For Loop Prematurely---the EXIT Statement
248(1)
Iterations in a For Loop
249(1)
Another Look at the For Loop
250(1)
Nested For Loops
250(2)
Valid Nesting of For Loops
252(1)
Arrays Versus Simple Variables
253(1)
Declaring Arrays
254(3)
The DIM Statement
254(2)
The OPTION BASE Statement
256(1)
Dynamic Allocation of Arrays
256(1)
Manipulating Arrays
257(7)
Subscripts
257(1)
Summing the Elements of an Array
258(6)
Multidimensional Arrays
264(3)
Manipulating Two-Dimensional Arrays
264(1)
Initializing Arrays
265(1)
Arrays with More than Two Dimensions
265(1)
Determining the Lower- and Upper-Bound Subscript Values of an Array
266(1)
Sorting
267(7)
The Bubble Sort
268(1)
The SWAP Statement
269(1)
Implementing the Bubble Sort
269(3)
The Shell Sort
272(2)
Table Processing
274(11)
Table Organization
274(1)
Positionally-Organized Tables
274(2)
Argument-Organized Tables
276(1)
Serial Search
277(3)
Ordering the Table Arguments for a Serial Search
280(1)
Binary Search
281(3)
Combining Table-Access Methods
284(1)
Some Formulae for Searching
284(1)
What You Should Know
285(2)
Test Your QBasic Skills
287(5)
QBasic Programming Problems
292(7)
More on Strings and Functions
Introduction
299(1)
String Functions and Statements
299(17)
Concatenation, Substrings, and Character Counting Revisited --- +, LEN, LEFT$, RIGHT$, and MID$ Functions
300(3)
Substring Searching and Replacement --- INSTR Function and MID$ Statement
303(2)
Converting Character Codes --- ASC and CHR$ Functions
305(1)
Changing Case --- LCASE$ and UCASE$ Functions
306(2)
Modifying Data Types --- STR$ and VAL Functions
308(1)
Duplicating Strings --- SPACE$ and STRING$ Functions
309(1)
Trimming Blank Characters --- LTRIM$ and RTRIM$ Functions
309(1)
Accessing the System Time and Date --- DATE$ and TIME$ Functions
310(4)
Setting the Time and Date --- DATE$ and TIME$ Statements
314(1)
Accepting String Data --- LINE INPUT Statement, INKEY$ and INPUT$ Functions
314(2)
Numeric Functions
316(13)
Arithmetic Functions --- ABS, FIX, INT, CINT, and SGN
317(1)
Generalized Procedures for Rounding and Truncation
318(1)
Exponential Functions --- SQR, EXP, and LOG
318(4)
Trigonometric Functions --- SIN, COS, TAN, and ATN
322(1)
Utility Functions --- POS, CSRLIN, and SCREEN
322(1)
Performance Testing --- TIMER Function
323(1)
Random Number Function and the RANDOMIZE Statement
324(5)
User-Defined Functions
329(6)
The DEF FN Statement
329(2)
Referencing User-Defined Functions
331(4)
Trapping Events
335(2)
What You Should Know
337(1)
Test Your QBasic Skills
337(4)
QBasic Programming Problems
341(8)
File Maintenance, Random File Processing, and Simulated-Indexed Files
Introduction
349(1)
Random Files
349(1)
Indexed Files
349(1)
File Maintenance
350(14)
Random File Processing
364(11)
Opening and Closing Random Files
364(1)
Creating the Record Structure for a Random File --- The TYPE Statement
365(2)
The GET and PUT Statements
367(1)
The LOC and LOF Functions
368(7)
Simulated-Indexed Files
375(14)
Part 1 Tasks: Build Index File
376(3)
Part 2: Displaying and Updating Records in the Simulated-Indexed File
379(10)
What Your Should Know
389(1)
Test Your QBasic Skills
390(1)
QBasic Programming Problems
391(6)
Computer Graphics and Sound
Introduction
397(6)
PC Graphics Modes
399(2)
The SCREEN and WIDTH Statements
401(1)
The WIDTH Statement
402(1)
Text-Mode Graphics
403(15)
The COLOR Statement for Text Mode
411(3)
Suspending Execution of a Program
414(4)
Medium-Resolution and High-Resolution Graphics
418(19)
The COLOR Statement for Medium-Resolution Graphics Mode
419(1)
The PSET and PRESET Statements
420(1)
The LINE Statement
421(2)
The CIRCLE Statement
423(2)
The PAINT Statement
425(1)
Tiling
426(2)
The DRAW Statement
428(3)
The WINDOW Statement
431(1)
The PMAP and POINT Functions
432(2)
The VIEW Statement
434(1)
The GET and PUT Statements for Graphics
435(2)
Sound and Music
437(3)
The SOUND Statement
438(1)
The PLAY Statement
439(1)
What You Should Know
440(2)
Test Your QBasic Skills
442(5)
QBasic Programming Problems
447(6)
Subprograms, Functions, and Chaining
Introduction
453(1)
Subprograms
453(10)
Subroutines versus Subprograms
453(2)
Types of Subprograms
455(1)
Parameters and Arguments
455(1)
Passing No Values to a Subprogram
456(1)
Passing Constants and Expressions
456(2)
Passing Variables and Individual Array Elements
458(1)
Passing an Entire Array
459(1)
Passing Values between Subprograms
460(1)
Sharing Variables with Individual Subprograms
460(2)
Sharing Variables with All Associated Subprograms
462(1)
Using the QBasic Editor to Enter Subprograms
463(6)
Editing Subprograms
465(2)
Splitting the View Window
467(1)
Saving, Loading, and Executing the Main Program and Associated Subprograms
468(1)
Printing the Main Program and Associated Subprograms
468(1)
Functions
469(8)
An Example of a Recursive Function
471(2)
Using the QBasic Editor to Enter Functions
473(4)
Chaining
477(2)
What You Should Know
479(1)
Test Your QBasic Skills
480(2)
QBasic Programming Problems
482(1)
An Introduction to Visual Basic
What Is Visual Basic?
483(1)
The Three-Step Approach to Building Applications with Visual Basic
484(5)
Create the Interface
484(1)
Set Properties
485(1)
Write Code
486(2)
Methods
488(1)
Functions
489(1)
The Visual Basic Environment
489(2)
Building a Currency Conversion Application
491(1)
Creating the Interface for the Currency Application
491(5)
Setting the Size of a Form
492(1)
Positioning a Form
493(1)
Adding and Removing Controls
493(3)
Changing the Location and Size of Controls
496(1)
Setting Properties for the Currency Application
496(4)
The Caption Property
496(1)
The Text Property
497(1)
The BorderStyle Property
498(1)
The Name Property
498(2)
Writing Code for the Currency Conversion Application
500(1)
Saving a Visual Basic Project
501(1)
Starting, Opening, and Running Projects
502(2)
Starting a New Project
503(1)
Opening a Project
503(1)
Running an Application
504(1)
Exiting Visual Basic
504(1)
What You Should Know
504(1)
Visual Basic Application Problems
505(2)
Appendix A Program Design Tools --- Flowcharts, Pseudocode, Nassi-Schneiderman Charts, and Warnier-Orr diagrams
A.1 Program Flowcharting
507(3)
Purpose of Flowcharting
507(1)
Flowchart Notation
507(3)
A.2 Guidelines for Preparation of Flowcharts
510(2)
Straight-Line Flowcharts
510(1)
Flowcharts with Looping
510(2)
A.3 Control Structures
512(2)
A.4 Proper Programs
514(1)
A.5 Flowcharting Tips
514(2)
A.6 Pseudocode
516(2)
A.7 Nassi-Schneiderman Charts
518(1)
A.8 Warnier-Orr Diagrams
519(2)
A.9 Test Your QBasic Skills
521(4)
Appendix B Menu Commands and Windows
B.1 Selection Commands
525(1)
B.2 The QBasic Menu Bar
526(6)
The File Menu
526(1)
The Edit Menu
527(1)
The View Menu
527(1)
The Search Menu
528(1)
The Run Menu
529(1)
The Debug Menu
529(1)
The Options Menu
530(1)
The Help Menu
531(1)
B.3 Using Windows to Your Advantage
532(1)
Changing the Active Window
532(1)
Changing the Window Size
532(1)
Scrolling in the Active Window
532(1)
Appendix C QBasic Debugging Techniques and Programming Tips
C.1 Debugging Techniques
533(2)
Examining Values through the Immediate Window
533(1)
Executing One Statement At a Time
534(1)
Setting Breakpoints
534(1)
Tracing
535(1)
Set Next Statement
535(1)
C.2 Trapping User Errors (On Error Goto and Resume)
535(4)
C.3 Programming Tips
539(2)
C.4 Program Style Tips
541(2)
Appendix D ASCII Character Set and Personal Computer Literature and Web Sites
D.1 ASCII Character Codes
543(1)
D.2 Personal Computer Magazines, Newspapers, and Urls
543(4)
Personal Computer Magazines
545(1)
Personal Computer Newspapers
545(1)
URLs
545(2)
Appendix E Answers to the Even-Numbered Test Your QBasic Skills Exercises 547(18)
Index 565
QBasic Reference Card R.I