Shared Flashcard Set

Details

CIS220
Lecture 16
18
Computer Science
Undergraduate 1
06/21/2008

Additional Computer Science Flashcards

 


 

Cards

Term
Variables
Definition
Holds data that can be changed
Term
What are the 4 properties for variables
Definition

1.  Name

2.  Data Type

3.  Value- can change

4.  Scope- refers to a public or private function

Term

Private Function

Definition

Ex. Private function GO ()

the function can only be used for the current module.

Term

Public Function

Definition

Ex. Public Function GO ()

Function can be used on multiple modules.

Term
Characteristics for Variables
Definition

1. No special characters (!,#,$)

2. Must begin with alpha up to 250 characters

3. Not case SenSitive

Term

Variable Naming Conventions

Definition

1. Arent required, but good programming

2. Don't abbrievate unless obvious (ex. StrAddress)

Term
Variable Declarations
Definition

1. Arent required but a good progamming.

2. Makes it easier to understand

Term
Dimension Statement
Definition

Dim, used to declare a variable. 

(ex. Dim IntAge as integer)

For multiple variables use a comma

(ex. Dim IntAge as interger, StrFname as string)

Term
Initializing Variables
Definition

Determines the value of a variable

Term
Default for Variables for Intializing
Definition

-Numeric: Zero (0)

-Boolean: (false)

-String: empty string of ""

 

If not appropriate can assign the values

ex. Variable= intialization value

dbl Frequency=4.2

Term
Data Types
Definition

-Whole #s = (Byte, integer, long) No Decimals

-Decimal # = (single, double, currency)

-Boolean Value = (True/False, Yes/No)

-Strings = (Text)

-Constants = (Never changes)

Dates and Time

Term

Whole # data type and ranges

Definition

Byte- 0 to 255

Integer- -32,768 to 32,768

Long- -2,147,483,648 to 2,147,483,648

Term
Decimal Data Types and Ranges
Definition

Single- -3.40E38 to 3.40E38 (7 decimals)

Double- -1.79E308 to 1.79E308 (15 decimals)
Currency- -922,337,203,685,477.5808 to 922,337,203,685,477.5808

Term
String Data Type
Definition

-Sequence of characters enclosed in double quotes.

Ex. "BOB"

-Declaration

Ex. Dim StrFname as String

-Assignment

Ex. StrLname = "supercool"

Term
String Concatenation
Definition
Multiple strings can be joined by a & sign.
Term
Option Explicit characteristics
Definition

-Top of all modules and forms

-requires all variables to explicity declared

- it will omit a new variable that is created,  but requires formal initalizing.

-improves memory management.

Term

Constants

Definition

- Memory location whose contents can't change while a program is running.

Term
Internal Documentation
Definition
-Remarks made within the program, that clarifies what the program is about, suppose to accomplish, or what a line of code is to do.
Supporting users have an ad free experience!