QBASIC CONSTANTS

  Blog Desk       September 7, 2019     3375 5 Comments

QBASIC CONSTANTS

The data or the values that are used in a program are known as constants and they cannot be changed during the program execution. The data may be a letter, words, numbers, or special characters. A constant can be stored in a variable when it is required to use in more than one statement or expression. These data or constants are grouped into two major categories. They are:

a. String Constant
b. Numeric Constant

a. String Constant

String constants is a set of characters, numbers, special characters enclosed in double quotes. Mathematical operations cannot be performed on String Constants. Example: “Hello World”, “Nepal”, “ Hi Tech Computer”, “Contact No. 9847875648”, “Welcome to our company”, “Ram”, “My School” etc.

b. Numeric Constant

Numeric constants which hold numeric data or values is called numeric constants. Which can be performed Mathematical and logical operations. Numeric data should not be enclosed in double quotes. Thousand separators are not allowed to use in numeric constant. Example: +108, -110, 105.50, 720, 45603, etc.

Numeric Constants may be integer, long integer, single precision or double precision.

  • Integer:Integer is whole number between -32768 to 32767.
  • Long Integer:Long Integer is a large range of whole number between -2,147,483,648 to +2,147,483,647
  • Single Precision:Single Precision is seven digit or less than seven digit positive or negative number that contains decimal point. Single Precision can be in the exponential form using E or with a trailing exclamation point. (!). 564, 78.65, 1.2 E-06 and 12345.678! are some examples of Single Precision Constants.
  • Double Precision:Double Precision is 17 digit or less than 17 digit positive or negative numbers that contains decimal point. Double Precision can be in the exponential form using D or with trailing hash sing (#). 9999.99D-12, 2345.786# and 3456.78 are some examples of Double Precision Constants.

5 responses to “QBASIC CONSTANTS”

  1. episodes says:

    Hey there. I discovered your blog by means of Google even as looking for a similar subject, your website came up. It seems great. I have bookmarked it in my google bookmarks to visit then. Lindi Stephanus Nash

  2. diziler says:

    Im obliged for the blog post. Thanks Again. Fantastic. Loralee Reg Nikolos Gisele Kincaid Ashman

  3. hindi movie says:

    Awesome write-up. I am a normal visitor of your blog and appreciate you taking the time to maintain the nice site. I will be a frequent visitor for a really long time. Kellina Ewart Nesline

  4. movies says:

    buy followers and likes on instagram buy followers and likes on instagram Demeter Luciano Maybelle

  5. episodes says:

    Virality iPhone monetization burn rate seed money buzz social media. Handshake bandwidth venture responsive web design hackathon. Graphical user interface influencer branding mass market business-to-consumer buzz vesting period seed round. Partner network ecosystem stock freemium. Fernande Ernie Amalburga

Leave a Reply

Your email address will not be published. Required fields are marked *