qbasic
QBASIC is BASIC (Beginner's All-purpose Symbolic Instruction Code, beginners General Instruction Code) language, a variant of Microsoft's development by the United States in 1991 with the introduction of MS-DOS 5.0. It can not be compiled into standalone executable files, source code in the integrated development environment (IDE), is first compiled into intermediate code, and then in the middle of the code is interpreted in the IDE. It is designed to replace the GW-BASIC, and was integrated in the MS-DOS 5.0 and later (including Windows 95) in the. QBASIC released earlier based on Microsoft QuickBASIC 4.5, but removed the latter part of compilation and linking.
directory
QBASIC status of grammatical features of QBASIC QBASIC shortcut key example is the computer language Basic features of a high-level language,
air force one low, it is easy to learn,
nike air force one high, easy to use, is favored by the majority of computer users. Basic language and mathematical expressions expressions similar to natural language statements and similar, very easy for beginners to grasp, but the latest development of Basic Language Visual Basic 6.0,7.0, its friendly visual programming interface, powerful surface object programming capabilities to its online distribution and online inquiry functions, not only allows users to conveniently and easily write applications with any function, and better adapted to the network era. The status of Microsoft QBASIC a newer version of Windows no longer integrated QBASIC. However, users of Windows 98 CD-ROM can TOOLS OLDMSDOS directory to find it in the Windows 95 CD-ROM, it is stored in the OTHER OLDMSDOS directory. Microsoft's Web site technical support to its MS-DOS only authorized users effective. QBASIC has a commendable integrated development environment and a powerful integrated debugger, which all amazing in that era. Even today, QBASIC is still a lot of programming books for beginners theme. Quick BASIC syntax similar to but different from the other Microsoft version of BASIC is an early implementation, QBASIC is a structured programming language. And GW-BASIC, compared,
nike air force 1 high, QBASIC major improvements are: expanding the type of variable and constant variable name length: 40 characters added long integer variable defines the value of fixed-length character constants, string constants provides a new choice structure conditional statements IF THEN ELSE SELECT improved multi-branch loop structure statement to add the following two loops: WHILE loop】 【WHILE END】 【DO loop DO WHILE LOOP subroutines and functions as a separate module does not need the line number code sample (assignment, the sum operation, and displays the results) LET A = 10 LET B = 20 LET C = A + B PRINT C preparation programs in order to save time, you can not write LET; and,
nike air force one, PRINT program directly in the preparation of It is very important in the contest, the program first line must be CLS! QBASIC 7.1 shortcuts keyboard shortcuts: F5: Run the program and continue the interrupted program; Ctrl + Break: interrupt a running program; Shift + F5: Start from the first statement to re-run the program; F4: When the program is interrupted run, View run results screen, press F4 then switch back to the code screen; F1: help. F2: Switch the main program, or SUB,
air force 1 high, FUNCTION. F9: increase the breakpoint. Alt + Enter: full screen. Shift + F5: again from scratch in the implementation of program termination. Examples Example 1: on the one kilogram of mushroom farms was 7.5 million, compile a program from the keyboard to enter the weight, the computer automatically calculate the total price INPUT X SUM = 7.5 * X PRINT SUM END Example 2: to sell watermelons, the following per kg 10 kg 1.4 yuan, more than 10 kg of 0.7 yuan per kilogram, how much input buy kg (must be a natural number), the output how much it costs. INPUT X IF X FIX (X) THEN? Enter the 10 letters, compare the size of the output one of the largest DIM A $ (10) FOR I = 1 TO 10 INPUT A $ (I) NEXT I B $ = A $ (1) FOR I = 2 TO 10 IF B $ < ; A $ (I) THEN B $ = A $ (I) NEXT I PRINT B $ END Example 4: a game: CLS 'clear the screen LOCATE 5, 38' target 5,38 PRINT , 34 'target 16,34 PRINT Line 8 PRINT 50 'random decisions the player 1 HP HP2 = INT (RND * 50) + 50' random decisions the player 2 HP PRINT STRING $ (12, $ (HP1) 'Show the player 1 HP PRINT STRING $ (12, key to contiune 16 - LEN (Name2 $), Row = Row + 1 'Round the number of +1 PRINT STRING $ (11, now has HP LOOP WHILE INKEY $ = ; + Name2 $ + 0 THEN EXIT DO if the player's HP is less than 1 or 2, equal to 0 to exit the loop DO LOOP WHILE INKEY $ = + Name2 $ + (12, , ; UprightBAR $ = INPUT $ (1) SELECT CASE UCASE $ (K $) CASE : CASE 15 PRINT LEFT $ (S $, 1); COLOR 7 PRINT MID $ (S $, 2) ELSE COLOR 7 PRINT LEFT $ (S $, S - 1); COLOR 15 PRINT MID $ (S $, S, 1) ; COLOR 7 PRINT MID $ (S $, S + 1) END IF GOTO PrintHLWordBack HorizontalBAR: SCREEN 1 FOR I = 1 TO 200 PSET (I, 100) DO: LOOP WHILE INKEY $ = HorizontalBARBack UprightBAR: SCREEN 1 FOR I = 1 TO 200 PSET (100, I) DO: LOOP WHILE INKEY $ = PSET (100, I) DO: LOOP WHILE INKEY $ = NEXT I SCREEN 0 GOTO BiasBAR1Back BiasBAR2: SCREEN 1 FOR I = 1 TO 200 PSET (I, 200 - I) DO: LOOP WHILE INKEY $ = 200 PSET (I, I) PSET (I, 200 - I) DO: LOOP WHILE INKEY $ = 100, I) PSET (I, I) PSET (I, 200 - I) DO: LOOP WHILE INKEY $ = Extended Reading List: 1
http://baike.baidu.com
2
http://post.baidu.com/f?kw=qbasic
3
QBASIC Download Address:
4
4.0 version
http://down.lihuasoft.net/irrwd/down...am/vb/qb40.zip
5
4.5 version
http://dlzisai.pchome .net/development/linetools/qb45.zip
6
4.0 version of the address, there are many examples of QB programs, such as SINEWAVE.BAS,
air force one low nike, can draw a sine wave. Open Category: Computer I have to perfect