Home > Basic Programming > What I’ve been working on for the past week ‘-‘

What I’ve been working on for the past week ‘-‘

QBasic 1.1

Variables and Data Types QB64 Tutorial 4


-Hold data in memory

-Are assigned a data type

-The data can change throughout the program’s operation

-The data entered must be the same data type as assigned to the variable

Qbasic 1.1 Data Types

String……..Text and Characters


-32,768 to 32,767


-2,147,483,648 to 2,147,483,647

Single…………Floating Point

-1.67×10^308 to 1.67×10^308

Note: QBasic 1.1 May have a problem with computations involving double data types

*Updated* Data types

_Integer64   &&

-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807

_Float       ##

-1.18×10^4932 to 1.18×10^4932

Info on all data types go to: http://www.qb64.net/wiki/index.php?title=Data_types

*Header$ in this example is a string

*Num1% in this example is an integer to = 5

*Num2% is an integer to = 6

*Num3% is a long integer = to 45000

*Num4% is also a long integer set to =  54000

*Num5! (Single) = 4.5

*Num6! = 6.75

*Num7# is a double data type set(Double Integer)?I believe? to = 56000.25

*Num8# is another double data type set to 89000.34

He then prints the header

Then prints some calculations

*This is a way to declare variables*

Another way to declare variables- You can use this in visual basic as well*

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: