CHE110-L07 - Variables & Data Types CHE110 Introduction to...

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

View Full Document Right Arrow Icon
Department of Chemical Engineering Variables & Data Types CHE110 Introduction to Programming & Problem Solving
Background image of page 1

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

View Full DocumentRight Arrow Icon
Department of Chemical Engineering VBA Naming Rules for Variables Alphabetic/Alphanumeric names acceptable – Alphabetic character as first character – cannot use # , $ , % , & , ! , . , < space > – cannot use keywords (See VBA Language Reference in Help) • Variable Names can be up to 254 characters in length • Case Insensitive ( e.g. t is equivalent to T ).
Background image of page 2
Department of Chemical Engineering VBA Data Types Type Bytes Range Integer 2 +/- 32,767 Long 4 +/- 2,147,483,647 Single 4+ / - ~ 1 0 -45 to 10 38 Double 8+ / - ~ 1 0 -324 to 10 308 String 10+ 0 to 2 billion Boolean 2 True or False Variant 16 +/- ~10 -324 to 10 308
Background image of page 3

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

View Full DocumentRight Arrow Icon
Department of Chemical Engineering Variable Declaration and Typing • Variables are declared using the Dim keyword. Dim x Creates variable x of type Variant • Specific data types are assigned using the As keyword. Dim x As Double Creates variable x of type Double • Constants can also be defined using the Const keyword.
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/08/2009 for the course CHE 101 taught by Professor Coronel during the Spring '06 term at Rose-Hulman.

Page1 / 8

CHE110-L07 - Variables & Data Types CHE110 Introduction to...

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

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