17 LanguageFundamentals

17 LanguageFundamentals - Basic Language Fundamentals 1...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
August 05 Kamal B. Rojiani 1 Basic Language Fundamentals 1. Statements 2. Data Types 3. Variables and Constants 4. Operators, Arithmetic Operations 5. Conditional Statements 6. Loops 7. Functions 8. Subroutines 9. Arrays 10. File Operations
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
August 05 Kamal B. Rojiani 2 Data Types 1. Numeric Integer Long integer Single-precision Double-precision Currency 2. Character Strings Variable length Fixed length 3. Variant
Background image of page 2
August 05 Kamal B. Rojiani 3 Numeric Data Types Integers Four bytes 2,147,483,647 to -2,147,483,648 Long Integers Eight bytes 9,223,372,036,854,775,808 to -9,223,372,036,854,775,807 Short Two bytes -32,786 to 32,787 Single Precision Four bytes -3.402833E+38 to -1.40129E-45 negative 1.40129E-45 to 3.402823E+32 positive Double Precision Eight bytes -1.7977E+308 to -4.9407E-324 negative 4.9407E-324 to 1.7977E+308 positive
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
August 05 Kamal B. Rojiani 4 Integers z Integers are whole numbers z They may be either positive or negative z If the number if positive it is not necessary to put a + sign in front of the number z You cannot use commas to separate groups of digits in an integer z Examples of valid integers are: 1234 -13550 1667 -340 15 -30000 -5002 221 z Examples of invalid integers are: -500,00 3,456 3.123
Background image of page 4
August 05 Kamal B. Rojiani 5 Long Integers z A long integer can hold a whole number but it can store a larger range of values z To declare a long integer variable you use the following declaration statement DIM x as Long
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Kamal B. Rojiani 6 Single Precision z A real number is a number which contains a decimal point. In Basic real numbers can be represented as single precision numbers or as double precision numbers. z
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/14/2008 for the course CEE 3804 taught by Professor Aatrani during the Fall '07 term at Virginia Tech.

Page1 / 24

17 LanguageFundamentals - Basic Language Fundamentals 1...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online