SlideShare a Scribd company logo
1 of 15
QBASIC
BY:
FERCIE S. CASERIA
JUSTIN RONN S. FABIA
• (Before we get started about other different things, first we have to know about
QBASIC)
INTRODUCTION TO QBASIC:
BASIC stands for Beginnner’s All Purpose
Symbolic Instruction Code.It was ,in1963 at
Dartmouth College,by the Mathemeticians John
George Kemeny and Tom Kurtzas.
BASIC is an interpreter which means it read
every line, translates it and let’s the computer
execute it before reading another.Each
instruction starts with a line number.
Features of Qbasic
It is a user friendly language.
It is widely known and accepted programming
language.
It is one of the most flexible language, a modification can
easily be done in already existing program
Language is easy since the variables can be named
easily and uses simple English phrases with mathematical
expressions.
Rules of Qbasic
Every programming language has a set of rules that have to be
followed while writing a program, following are some rules of QBASIC
language.
 All Qbasic program are made up of series of statements, which are executed
in the orderin which they are written.
 Every statement should have at least one Qbasic command word.The words
that BASIC recognizes are called keywords.
 All the command words have to be written using some standard rules, which
are called ”SYNTAX RULES”.yntax is the grammar of writing the statement in a
language.Syntax errors are generaed when improper syntax is detected.
Data is a collection of facts and figures that is entered in to the computer through
The keyboard.Data is of two types:
CONSTANT: data whose value doesn’t change or remains fixed.There are two types of
constants:
1.Numeric Constant : Numbers – Negative or Positive used for mathematical
calculations. e.g. -1,2,0
2.Alpha Numeric Constant/String: Numbers or alphabets written within double
quotes(inverted commas””). E.g. “Computer”,”Operating System”
QBASIC DATA
 Variable : Data whose value is not constant and may change due
to some calculationsduring the program execution.It is a
location in the computers memory , which stores the
values depending on what value is held.Variables of two
types:
1. Numeric Variable – the variable that holds a numeric constant
for arithmetic
Calculations (+,-,*,/) is called a numeric
variable. e.g. A = 15,here A is the numeric
variable.
2. Alpha Numeric Variable – the variable that holds an alpha
numeric constant,which cannot be used
for arithmetic calculaations, is called
alphanumeric variable or string
variable.An apha numeric variable must
end with a $ sign and the alpha
numeric constant must be enclosed in
inverted commas.
e.g. Name$ =“Akanksha”,here Name$
is an alpha numeric variable.
TYPES OF MODE IN
QBASIC
Once QBASIC program is loaded into the computer memory,it displays
OK prompt..OK means it ready to accept the commands.QBASIC can be
made to translate your instructions in two modes:
Direct Mode
Program Mode
1.DIRECT MODE
Direct Mode : The accepts single line instructions from the
user and the output is viewed as soon as enter key is
pressed.The instructions are not stored in the memory .This
mode can be used to do quick calculations.They do not have
line numbers. e.g. Print 3+4
Print”This is the direct mode in QBASIC”
2.PROGRAM MODE
PROGRAM MODE : The mode is used to type a program which is
stored in the memory.They have line numbers.We have to give the
command to get the output.
E.g. 10 PRINT 3+4
20 END
RUN
Programs are built up with set of instructions or commands.Every
Programming Language has its owns SYNTAX (rules) and
COMMANDS.
COMMAND/KEYWORDS IN QBASIC AND
THEIR FUNCTIONS:
The following commands do not need line number.
1.LIST - the command is used to list the program on the screen
2.RUN - the command is used to execute the program
3,LLIST - the command is used to list the program in hard copy
4.LPRINT - the command is used to get the output of the program
on the hardcopy
5.NEW - the command is used clear the memory of the existing
program
6. SYSTEM - the command is used to take you back to dos
prompt
7. PRINT AND CLS - the command can also be used without a line
number. Print is used to view the display on the
screen and CLS to clear the screen
8. RME - the command is used to show the position of the
mistake
9. SAVE - the keyword is used to save the program
E.g. SAVE”PROGRAM 1” Qbasic will automatically
add a period
10. LOAD - The keyword is used to LOAD the program from
disk to memory.
QBASIC COMMANDS
1. CLS : this command is used to clear the screen.
2. PRINT : Print command is used to display the output on the
screen.
E.g. PRINT “HELLO WORLD”
PRINT 80*8
PRINT – only Print command will leave blank
space.
Print Tab(10) “NAVRACHANA” – will print
Navrachana on 10 column.
3. REM : it stands for REMARK.It gives an explanation of the
program or of the statements in the program thereby
making the program more understandable to the
reader. The computer does not execute this statement
since whatever is written after REM is ignored by the
compiler. REM can be used anywhere and many times in a
program.
4. LET : it assigns a value to a variable in a program. It stores
a value in the memory location.
QBASIC REMINDER
A QBASIC program consists of lines containing
1. A line number
2. A QBASIC keyword like PRINT,END etc.h
3. Each program line begins with positive number.
4. No two lines should have the same number
Fercie Caseria
Justin Ronn Fabia

More Related Content

What's hot (20)

Software and its types
Software and its typesSoftware and its types
Software and its types
 
Types of operating system
Types of operating systemTypes of operating system
Types of operating system
 
Qbasic introduction
Qbasic introductionQbasic introduction
Qbasic introduction
 
Computer Languages....ppt
Computer Languages....pptComputer Languages....ppt
Computer Languages....ppt
 
Programming
ProgrammingProgramming
Programming
 
Types of Programming Languages
Types of Programming LanguagesTypes of Programming Languages
Types of Programming Languages
 
Introduction to software
Introduction to softwareIntroduction to software
Introduction to software
 
Language processor
Language processorLanguage processor
Language processor
 
Programming language
Programming languageProgramming language
Programming language
 
Operating systems
Operating systems Operating systems
Operating systems
 
Microsoft Word
Microsoft WordMicrosoft Word
Microsoft Word
 
Basic Computer Programming
Basic Computer ProgrammingBasic Computer Programming
Basic Computer Programming
 
Compiler vs interpreter
Compiler vs interpreterCompiler vs interpreter
Compiler vs interpreter
 
1. Introduction to Computer (CSI-321)
1. Introduction to Computer (CSI-321)1. Introduction to Computer (CSI-321)
1. Introduction to Computer (CSI-321)
 
Computer keyboard
Computer keyboardComputer keyboard
Computer keyboard
 
Qbasic Tutorial
Qbasic TutorialQbasic Tutorial
Qbasic Tutorial
 
Tux Paint
Tux PaintTux Paint
Tux Paint
 
Os ppt
Os pptOs ppt
Os ppt
 
Qbasic
QbasicQbasic
Qbasic
 
Presentation on output device
Presentation on output devicePresentation on output device
Presentation on output device
 

Similar to Qbasic

INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfSubramanyambharathis
 
Synapseindia dot net development computer programming
Synapseindia dot net development  computer programmingSynapseindia dot net development  computer programming
Synapseindia dot net development computer programmingSynapseindiappsdevelopment
 
Assembly Language Programming
Assembly Language ProgrammingAssembly Language Programming
Assembly Language ProgrammingNiropam Das
 
The role of the cpu in the operation
The role of the cpu in the operationThe role of the cpu in the operation
The role of the cpu in the operationmary_ramsay
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & LanguagesGaditek
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & LanguagesGaditek
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGJEENA SARA VIJU
 
Microprocessor chapter 9 - assembly language programming
Microprocessor  chapter 9 - assembly language programmingMicroprocessor  chapter 9 - assembly language programming
Microprocessor chapter 9 - assembly language programmingWondeson Emeye
 
Whole c++ lectures ITM1 Th
Whole c++ lectures ITM1 ThWhole c++ lectures ITM1 Th
Whole c++ lectures ITM1 ThAram Mohammed
 
Computer and programing basics.pptx
Computer and programing basics.pptxComputer and programing basics.pptx
Computer and programing basics.pptxgaafergoda
 

Similar to Qbasic (20)

Computer programming
Computer programmingComputer programming
Computer programming
 
Qbasic tutorial
Qbasic tutorialQbasic tutorial
Qbasic tutorial
 
The Knowledge of QBasic
The Knowledge of QBasicThe Knowledge of QBasic
The Knowledge of QBasic
 
C programming
C programmingC programming
C programming
 
01CHAP_1.PPT
01CHAP_1.PPT01CHAP_1.PPT
01CHAP_1.PPT
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
 
Presentation 2.ppt
Presentation 2.pptPresentation 2.ppt
Presentation 2.ppt
 
Synapseindia dot net development computer programming
Synapseindia dot net development  computer programmingSynapseindia dot net development  computer programming
Synapseindia dot net development computer programming
 
Assembly Language Programming
Assembly Language ProgrammingAssembly Language Programming
Assembly Language Programming
 
The role of the cpu in the operation
The role of the cpu in the operationThe role of the cpu in the operation
The role of the cpu in the operation
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMING
 
Microprocessor chapter 9 - assembly language programming
Microprocessor  chapter 9 - assembly language programmingMicroprocessor  chapter 9 - assembly language programming
Microprocessor chapter 9 - assembly language programming
 
Whole c++ lectures ITM1 Th
Whole c++ lectures ITM1 ThWhole c++ lectures ITM1 Th
Whole c++ lectures ITM1 Th
 
6272 cnote
6272 cnote6272 cnote
6272 cnote
 
C progrmming
C progrmmingC progrmming
C progrmming
 
Ic lecture8
Ic lecture8 Ic lecture8
Ic lecture8
 
Computer and programing basics.pptx
Computer and programing basics.pptxComputer and programing basics.pptx
Computer and programing basics.pptx
 
Programming in c
Programming in cProgramming in c
Programming in c
 

Recently uploaded

Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxnada99848
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 

Recently uploaded (20)

Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptx
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 

Qbasic

  • 2. • (Before we get started about other different things, first we have to know about QBASIC) INTRODUCTION TO QBASIC: BASIC stands for Beginnner’s All Purpose Symbolic Instruction Code.It was ,in1963 at Dartmouth College,by the Mathemeticians John George Kemeny and Tom Kurtzas. BASIC is an interpreter which means it read every line, translates it and let’s the computer execute it before reading another.Each instruction starts with a line number.
  • 3. Features of Qbasic It is a user friendly language. It is widely known and accepted programming language. It is one of the most flexible language, a modification can easily be done in already existing program Language is easy since the variables can be named easily and uses simple English phrases with mathematical expressions.
  • 4. Rules of Qbasic Every programming language has a set of rules that have to be followed while writing a program, following are some rules of QBASIC language.  All Qbasic program are made up of series of statements, which are executed in the orderin which they are written.  Every statement should have at least one Qbasic command word.The words that BASIC recognizes are called keywords.  All the command words have to be written using some standard rules, which are called ”SYNTAX RULES”.yntax is the grammar of writing the statement in a language.Syntax errors are generaed when improper syntax is detected.
  • 5. Data is a collection of facts and figures that is entered in to the computer through The keyboard.Data is of two types: CONSTANT: data whose value doesn’t change or remains fixed.There are two types of constants: 1.Numeric Constant : Numbers – Negative or Positive used for mathematical calculations. e.g. -1,2,0 2.Alpha Numeric Constant/String: Numbers or alphabets written within double quotes(inverted commas””). E.g. “Computer”,”Operating System” QBASIC DATA
  • 6.  Variable : Data whose value is not constant and may change due to some calculationsduring the program execution.It is a location in the computers memory , which stores the values depending on what value is held.Variables of two types: 1. Numeric Variable – the variable that holds a numeric constant for arithmetic Calculations (+,-,*,/) is called a numeric variable. e.g. A = 15,here A is the numeric variable.
  • 7. 2. Alpha Numeric Variable – the variable that holds an alpha numeric constant,which cannot be used for arithmetic calculaations, is called alphanumeric variable or string variable.An apha numeric variable must end with a $ sign and the alpha numeric constant must be enclosed in inverted commas. e.g. Name$ =“Akanksha”,here Name$ is an alpha numeric variable.
  • 8. TYPES OF MODE IN QBASIC Once QBASIC program is loaded into the computer memory,it displays OK prompt..OK means it ready to accept the commands.QBASIC can be made to translate your instructions in two modes: Direct Mode Program Mode
  • 9. 1.DIRECT MODE Direct Mode : The accepts single line instructions from the user and the output is viewed as soon as enter key is pressed.The instructions are not stored in the memory .This mode can be used to do quick calculations.They do not have line numbers. e.g. Print 3+4 Print”This is the direct mode in QBASIC”
  • 10. 2.PROGRAM MODE PROGRAM MODE : The mode is used to type a program which is stored in the memory.They have line numbers.We have to give the command to get the output. E.g. 10 PRINT 3+4 20 END RUN Programs are built up with set of instructions or commands.Every Programming Language has its owns SYNTAX (rules) and COMMANDS.
  • 11. COMMAND/KEYWORDS IN QBASIC AND THEIR FUNCTIONS: The following commands do not need line number. 1.LIST - the command is used to list the program on the screen 2.RUN - the command is used to execute the program 3,LLIST - the command is used to list the program in hard copy 4.LPRINT - the command is used to get the output of the program on the hardcopy 5.NEW - the command is used clear the memory of the existing program
  • 12. 6. SYSTEM - the command is used to take you back to dos prompt 7. PRINT AND CLS - the command can also be used without a line number. Print is used to view the display on the screen and CLS to clear the screen 8. RME - the command is used to show the position of the mistake 9. SAVE - the keyword is used to save the program E.g. SAVE”PROGRAM 1” Qbasic will automatically add a period 10. LOAD - The keyword is used to LOAD the program from disk to memory.
  • 13. QBASIC COMMANDS 1. CLS : this command is used to clear the screen. 2. PRINT : Print command is used to display the output on the screen. E.g. PRINT “HELLO WORLD” PRINT 80*8 PRINT – only Print command will leave blank space. Print Tab(10) “NAVRACHANA” – will print Navrachana on 10 column.
  • 14. 3. REM : it stands for REMARK.It gives an explanation of the program or of the statements in the program thereby making the program more understandable to the reader. The computer does not execute this statement since whatever is written after REM is ignored by the compiler. REM can be used anywhere and many times in a program. 4. LET : it assigns a value to a variable in a program. It stores a value in the memory location.
  • 15. QBASIC REMINDER A QBASIC program consists of lines containing 1. A line number 2. A QBASIC keyword like PRINT,END etc.h 3. Each program line begins with positive number. 4. No two lines should have the same number Fercie Caseria Justin Ronn Fabia