SlideShare a Scribd company logo
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

High level and Low level Language
High level and Low level Language High level and Low level Language
High level and Low level Language
adnan usmani
 
Computer languages
Computer languagesComputer languages
Computer languages
BESOR ACADEMY
 
Programming languages
Programming languagesProgramming languages
Programming languages
Akash Varaiya
 
Fundamental of Computers
Fundamental of ComputersFundamental of Computers
Fundamental of Computers
Dr. Himanshu Gupta
 
Programming
ProgrammingProgramming
Programming
Leo Simon Anfone
 
Qbasic
QbasicQbasic
Qbasic
yousufvali
 
Introduction to Operating Systems
Introduction to Operating SystemsIntroduction to Operating Systems
Introduction to Operating Systems
Mukesh Chinta
 
generation of programming language
generation of programming languagegeneration of programming language
generation of programming language
lakshmi kumari neelapu
 
introduction to visual basic PPT.pptx
introduction to visual basic PPT.pptxintroduction to visual basic PPT.pptx
introduction to visual basic PPT.pptx
classall
 
Introduction to computer
Introduction to computerIntroduction to computer
Introduction to computer
Noor Zada
 
Programming Fundamentals
Programming FundamentalsProgramming Fundamentals
Programming Fundamentals
Trivuz ত্রিভুজ
 
Notepad
NotepadNotepad
Notepad
John Bhatt
 
Characteristics of computer
Characteristics of computerCharacteristics of computer
Characteristics of computer
Pankaj Pahuja
 
Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languages
Varun Garg
 
Control panel
Control panelControl panel
Control panel
manju_asnani
 
Computer Languages....ppt
Computer Languages....pptComputer Languages....ppt
Computer Languages....ppt
hashgeneration
 
Programming languages
Programming languagesProgramming languages
Programming languages
vito_carleone
 
Operating system and its function
Operating system and its functionOperating system and its function
Operating system and its function
Nikhi Jain
 
Compilers
CompilersCompilers
Files and Folders
Files and FoldersFiles and Folders
Files and Folders
cachs_computing
 

What's hot (20)

High level and Low level Language
High level and Low level Language High level and Low level Language
High level and Low level Language
 
Computer languages
Computer languagesComputer languages
Computer languages
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Fundamental of Computers
Fundamental of ComputersFundamental of Computers
Fundamental of Computers
 
Programming
ProgrammingProgramming
Programming
 
Qbasic
QbasicQbasic
Qbasic
 
Introduction to Operating Systems
Introduction to Operating SystemsIntroduction to Operating Systems
Introduction to Operating Systems
 
generation of programming language
generation of programming languagegeneration of programming language
generation of programming language
 
introduction to visual basic PPT.pptx
introduction to visual basic PPT.pptxintroduction to visual basic PPT.pptx
introduction to visual basic PPT.pptx
 
Introduction to computer
Introduction to computerIntroduction to computer
Introduction to computer
 
Programming Fundamentals
Programming FundamentalsProgramming Fundamentals
Programming Fundamentals
 
Notepad
NotepadNotepad
Notepad
 
Characteristics of computer
Characteristics of computerCharacteristics of computer
Characteristics of computer
 
Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languages
 
Control panel
Control panelControl panel
Control panel
 
Computer Languages....ppt
Computer Languages....pptComputer Languages....ppt
Computer Languages....ppt
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Operating system and its function
Operating system and its functionOperating system and its function
Operating system and its function
 
Compilers
CompilersCompilers
Compilers
 
Files and Folders
Files and FoldersFiles and Folders
Files and Folders
 

Similar to Qbasic

Computer programming
Computer programmingComputer programming
Computer programming
Vincent Valenzuela
 
Qbasic tutorial
Qbasic tutorialQbasic tutorial
Qbasic tutorial
jovelleluzon
 
C programming
C programmingC programming
C programming
Jigarthacker
 
01CHAP_1.PPT
01CHAP_1.PPT01CHAP_1.PPT
01CHAP_1.PPT
ManoRanjani30
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
Subramanyambharathis
 
Presentation 2.ppt
Presentation 2.pptPresentation 2.ppt
Presentation 2.ppt
UdhayaKumar175069
 
Synapseindia dot net development computer programming
Synapseindia dot net development  computer programmingSynapseindia dot net development  computer programming
Synapseindia dot net development computer programming
Synapseindiappsdevelopment
 
Assembly Language Programming
Assembly Language ProgrammingAssembly Language Programming
Assembly Language Programming
Niropam 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 operation
mary_ramsay
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
Gaditek
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
Gaditek
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMING
JEENA SARA VIJU
 
Microprocessor chapter 9 - assembly language programming
Microprocessor  chapter 9 - assembly language programmingMicroprocessor  chapter 9 - assembly language programming
Microprocessor chapter 9 - assembly language programming
Wondeson Emeye
 
Whole c++ lectures ITM1 Th
Whole c++ lectures ITM1 ThWhole c++ lectures ITM1 Th
Whole c++ lectures ITM1 Th
Aram Mohammed
 
6272 cnote
6272 cnote6272 cnote
6272 cnote
P Kiran Sree
 
C progrmming
C progrmmingC progrmming
C progrmming
Shivam Singhal
 
Ic lecture8
Ic lecture8 Ic lecture8
Ic lecture8
AttaullahRahimoon
 
Computer and programing basics.pptx
Computer and programing basics.pptxComputer and programing basics.pptx
Computer and programing basics.pptx
gaafergoda
 
Programming in C
Programming in CProgramming in C
Programming in C
Rvishnupriya2
 
Programming in c
Programming in cProgramming in c
Programming in c
vishnu973656
 

Similar to Qbasic (20)

Computer programming
Computer programmingComputer programming
Computer programming
 
Qbasic tutorial
Qbasic tutorialQbasic tutorial
Qbasic tutorial
 
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
 
Programming in c
Programming in cProgramming in c
Programming in c
 

Recently uploaded

LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Gerardo Pardo-Castellote
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 

Recently uploaded (20)

LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 

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