Posts

Showing posts from June, 2018

WelcomToQbasic

WELCOME TO QBASIC

Introduction (QBASIC PART-1 )

Image
                     QBASIC is a high level computer language published by Microsoft. QBASIC environment includes a full screen syntax checking, multi-file and multi-facilities, full-pull-down menus, syntax checking editor and a simple yet a power full menu structure that can be drive through either by the keyboard the mouse.

Features of QBASIC

The important features of QBASIC are as follows:- a) Facility of manipulating of characters string. b) Dynamic program debugging ability to carry out arithmetic operators c) Simplified grammar. d) Facility for allowing more sophisticated formula for results. e) Facility for real-time execution and task scheduling. f) Easy to understand and learn.

Getting Started

Image
Getting Started QB64 (originally QB32) is a self-hosting BASIC compiler for Microsoft Windows, Linux and Mac OS X, designed to be compatible with Microsoft QBasic and QuickBASIC. QB64 is a C++ emitter, which is integrated with a C++ compiler to provide compilation via C++ code optimization. Follow the insturction to get ready with you QBASIC SETUP To download QBSIC(qb64) offical website  click here You will be take to following page:- Download required verson for you as marked on the pic above ^ Download required verson for you by clicking as marked on the pic above ^ After Downloading QBASIC ZIP file You will have a similar file like this  Note:- if your file can't be open then you have to download zip file extractor. Don't know how to use software. click on the button to learn it LearnAboutZipFileExtractor Right Click and extract the zip file in safe location (i.e in another drive like d: e: f: etc.  After extracting the file you will

Some Elements Of QBASIC

  List of elements of QBASIC are as follows.   A) Characters Set B) Constant C) Variables D) Expression and Operator E) keyword F) Syntax

Character Set With Example

Character Set QBASIC character set is a set of valid character that a language can recognised. Character includes alphabetic, number and special characters. Charachers Set used in QBASIC are:-- #, $, !, %, & They are used at hte end of variales names to specify the type of variale. +, -, *, /, \ they are mathematical operators. < ,>, = They are relational operators. (, ) They are parenthesis. : It is used to write multiple statements in a single line. , ; They are separators and are used to separate the arguments in input and output statements. ^ Ti is exponentiation and is used to raise power to. ? It can be used in lace of  PRINT  Statement ' It is used to mark a line as a comment instead of a  REM  Statements " " Double Quote use to dispaly instruction to the user (used with  PRINT  Statements

Constant With Example

Constant Constants are data items that never change their value during a program execution. Their are two types of constant.A constant is something a universal value like value of pi, value of g, value of G, value of e in science. Types of Constant a) Numeric Constant b) String Constant a) Numeric Constant:- Numeric constants are positive or negative numbers on which mathematical operations such as addition, subtraction, multiplication and division can be formed. Some of the valid numeric constants are 150, -908, +23and 192.  Example:-  CONST pi=22/7 CONST g=9.8  a) String Constant:- String constants is a set of alpha numeric or special character enclosed within double quotes (“”). Blank spaces can also be used in a string. Some of the valid string constant are “Pritam” and “Dangol”.  Example:- CONST N$="Ramesh" CONST place$="Kirtipur 7, Kathmandu"  Note: Keyword is a reserved word which has fixed meaning . Example:- CONST for declaring constant PRI

Variable and Types With Example

Variables:- Variable refers to a storage area whose contents can vary during processing. All the variables are created in the memory of the computer. The data store can change during the execution of the programs. The variables name have the following properties:- i) Any variables name may be up to 40 character long ii) Can’t contain characters other than letter, number and types of declaration character ($, %, #, & and ?) iii) Variable name must began with a letter (A-Z a-z (i.e. lowercase or uppercase letter).) iv) Can’t be reserved word like INPUT, v) Variable name represent either numeric values or strings. vi) Can’t began with “FN” unless it is a function call. Types of Variable a) Numeric Variable b) String Variable a) Numeric variable:- Numeric Variables can be any single letter of alphabetic followed by one of the numerals.  Example:-  A=12  pi=3.14  c=79.89 b) String Variable:- String Variables had the string of character or alpha numeric its valu

Expression Types and operators with Example

Image
Expression and Operator Expression is a programming language statements that has a value. Usually an expression consists of an operator and each operands.  Operator performs mathematical or logical operations on value QBASIC supports following types of operators. Types of Operators:- a) Arithmetic operator b) Relational Operators c) Logical Operators d) String Operators a) Arithmatic Operators:- Arithmetic operator are used for various mathematical calculation . Arithmetic operators performed such as addition, subtraction, multiplication, division and exponentiation. A numeric expression is any collection of operators and operands. a) The following are the arithmetic operator used in QBASIC:-- Operators Operations Example ^ Exponential A^B - Negation -B * Multiplication A*B / Floating point division A/B \ integer division A\B MOD Modular Division A MOD B + Addition A+B - Subtraction A-B Example Code:- Example Output:- b) Relational Opera

KeyWord With Example

Keyword:- Keywords are specific words that are reserved as programming language commands. This words may only be used for their intended purpose some of the keywords of QBASIC programming are REM, INPUT, PRINT etc. Most of the keyword a automatically displayed in the Uppercase (i.e A-Z) by QBASIC.

Syntax With Example

Image
Syntax:- Syntax is a set of rules that must be followed when constructing a program. Syntax tell us how keywords and operators may be used. Forgetting a space or a small spelling mistake will make the Qbasic to produce “syntax Error” message and step program execution.  Following Image is a example of syntax Error When sysntax error occure in qb64