Qbasic

Páginas: 50 (12489 palabras) Publicado: 18 de abril de 2011
QBASIC Tutorial Table of Contents
Author's Notes Intro: Introduction to QBasic Computer Programming Language Chapter 1: Getting Started Chapter 2: Program Looping Chapter 3: Program Looping, Part 2 Chapter 4: Loading and Processing Data Chapter 5: User Data and Nested Loops Chapter 6: Input Range Testing and Range Tolerances Chapter 7: Random Number Generation Chapter 8: Subscripted Variables(Arrays) Chapter 9: Sorting Chapter 10: Output Formatting, Part 1 Chapter 11: Output Formatting, Part 2 Chapter 12: Output Formatting, Part 3 Chapter 13: String Variables Chapter 14: String Functions Chapter 15: More String Functions Chapter 16: Putting It All Together

2 3 5 9 14 18 22 28 34 40 47 53 58 64 70 75 79 83

Just a quick word (or 120) before we begin.
This tutorial was originallywritten in 1991. Although many things have changed between then and now, the fundamentals remain the same. It is still a good way to learn BASIC, and is a good launching point to go into Visual Basic. What has changed? In 1991, MS-DOS was the only operating system you needed. 640k of memory was all you needed. A 20 Mb hard drive would never get filled up. The (very slow by today's standards,1/100th the speed of current computers) 33MHz 80386 Processor was king. And QBASIC was included free with DOS. Windows 2.0 was just coming on the scene (If I remember correctly), but nobody really used it much. DOS was more stable, and faster. (Still is, in my opinion. Especially with my old Assembly Language code.) BASIC has evolved and changed, too. The language now contains objects (and the methods,events, and properties that go with them), there are over twice as many data types (Boolean, which was needed a long time ago, as well as new numeric types), the LET keyword is now obsolete, the GOTO keyword is now considered obsolete (although these 2 do still work), GOSUB and RETURN are obsolete, line numbers are gone (They were optional, but still supported in QBASIC), no more BSAVE or BLOAD,PEEK, POKE, INP, OUT, KEYn Function key support, KEY ON and KEY OFF, LOCATE, INKEY$, and WAIT are just some of the functions that are no longer part of BASIC (mostly because they are DOS-dependent). As far as LET being obsolete, you still assign variables the same way, you just don't put the word "LET" in front of it any more. Instead of LET NEWAMOUNT = 75 You simply use NEWAMOUNT = 75 In 1991,this was written for GW-BASIC, and in 1995 it was rewritten for QBASIC, which is the form you see it in now. Starting around 1996 or so, I switched from QuickBASIC (the compiler version of QBASIC) to VBDOS (Visual Basic for DOS compiler). That was a big jump! It was a wonderful compiler, though, especially for DOS development that had basic Windows-like properties (listboxes, pushbuttons, menus,drop-down lists, etc). About a year later I switched to Visual Basic 3.0 for Windows and never looked back (too much). Now It's VB6, which is an even bigger jump. Classes, Dictionaries, Objects, OOP, dot-notation, auto-completion (Yaay!!), big difference from the old BASICA days of the 1980s!! (Anybody remember the Commodore PET from the late 1970's?) The sorting chapter uses the Exchange Sort,because it's a little easier to understand, especially for Beginners. The Shell Sort (and the Recursive Sort, a.k.a. the Quick Sort) are much faster, but more complicated. Bubble Sort and Insertion Sort are too slow, so I didn't introduce them. Enjoy!!!!

Introduction to MS-DOS QBasic Computer Programming Language
So you've finally acquired that IBM PC-compatible computer, and want to know how toprogram it. Or perhaps you've had it for a while and are getting tired of running everybody else's programs. Or maybe you want it to do something very specific, but nobody seems to have a program that does what you want. That is why you have surfed to these pages. They will teach you, step by step, command by command, a large part of the the QBASIC language. There is one small catch, however, and...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Qbasic
  • Qbasic
  • Programas En Qbasic
  • Programacion en qbasic
  • Ejercicios en qbasic
  • Qbasic
  • qbasic
  • Qbasic

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS