• Join over 1.2 million students every month
  • Accelerate your learning by 29%
  • Unlimited access from just £6.99 per month

Visual Basic variables

Extracts from this document...

Introduction

Comparison of features used in program In Visual Basic variables are declared using Dim and then the name of the variable, which could be anything of your choice. Dim is short for DIMENSION. A Dim statement tells the computer to set up a place in the memory with the right dimensions to store a piece of data that has a certain data type. For example: Dim k As Integer Dim k As Integer sets up a place (location in memory) with the name k and enough space to hold a whole number. "k" is a variable because the values that this location have can vary. As well as setting up the right size of space for a variable, a Dim statement sets up all the things that can be done with the variable according to its data type. In this case Dim statement sets up all the things that can be done with a whole numbers. In Pascal the variables are declared using VAR instead of using Dim. ...read more.

Middle

Character: These are also used the same way in nearly all the languages and are set of symbols that may be represented by a computer at a particular time. These symbols are called characters and can be letters, digits, spaces, and punctuation marks and include non-printing, control characters. Boolean: can only have one of two values, true or false. This makes it easy to use the values of Boolean variables to control the flow of the program. Pointers: is the address or reference of a data element, which allows it to be retrieved without further searching. Pointers allow fast access to data because little searching is required. When used on the data stored in the computer's memory the pointer is usually the address of the data in the memory. However in a database system the pointer may be the primary key or the reference number of the related record. These are basically used to point towards a particular place, for example: Set rng= AciveSheet.Rows (1) This basically point towards the first row of the active sheet. ...read more.

Conclusion

As Range Dim I As Integer For I = 1 To 10 This example of array is basically a variable which is a collection of variable that use the same name, but are distinguished by the index value. In Pascal it would be written differently for example: VAR RANKS:ARRAY [0..51] OF INTEGER; SUITS:ARRAY [0..51] OF CHAR; I:INTEGER; This basically define the variables to store 52 integers. As you can see that they are declared differently in both of the programs Record: is a basic unit of data stored in a datafile. It is a collection of items, which may be of different data types, all relating to the individual or object the record describes and is treated as a unit for processing. Most datafiles contain records, which have the same types of information but about different individuals or objects. File: is a collection of related data. It is traditional to think of files as being structured as a collection of identically structured records mad up of fields Concatenation: this mainly used to join things up Program Routines These are part of the program to do a specific task. It may be a section of the main program or might be formalised as a procedure, function or subroutine ...read more.

The above preview is unformatted text

This student written piece of work is one of many that can be found in our AS and A Level Computer Science section.

Found what you're looking for?

  • Start learning 29% faster today
  • 150,000+ documents available
  • Just £6.99 a month

Not the one? Search for your essay title...
  • Join over 1.2 million students every month
  • Accelerate your learning by 29%
  • Unlimited access from just £6.99 per month

See related essaysSee related essays

Related AS and A Level Computer Science essays

  1. Visual basic

    Conversely, while VB is recognising a click on a button and running through the event's script, Qbasic is still trotting through its code, unaware that anything happened because it was not told to check. Benefits of working in a visual environment instead of a non-visual environment * Extremely popular due to ease of use.

  2. What is Java?

    objects, that act on each other, as opposed to a traditional view in which a program may be seen as a collection of functions, or simply as a list of instructions to the computer. Each object is capable of receiving messages, processing data, and sending messages to other objects.

  1. Statistics - How good are people's memory considering different factors?

    The picture and number sheets had 17 items each. The picture sheet had all its pictures printed onto the transparency. The numbers were on the same position on the sheet as the pictures were on theirs. The numbers were handwritten. The pictures included pictures such as a golf set, which had a golf club and a golf ball, and a cup and saucer set.

  2. Smart Card System

    Some of the benefits include: The ability to manage and control expenditures more effectively, fraud reduction, reduced paperwork and elimination of the need to complete redundant, time consuming forms. The potential of having one card with ability to access multiple services, networks and Internet.

  1. Investigating Visual Programs

    Conversely, while VB is recognising a click on a button and running through the event's script, Qbasic is still trotting through its code, unaware that anything happened because it was not told to check. Benefits of working in a visual environment instead of a non-visual environment * Extremely popular due to ease of use.

  2. Creating a Java Bot

    Now we have our bot running, "yay" this means that our AccessorMethods (and scripts that extend it) can access all the bots functions such as sendPrivateMessage(String s) etc. etc. via instance reference and a nifty little interface. To summarise: Bot Loads through batch -> Preloads a "static RS jar" ->

  1. data representation

    With ASCII, every character in a character set uses 8 bits (1 byte) so this sentence would use 104 bytes. Check it out. A common standard is the ASCII code (American Standard Code for Information Interchange) which was initially designed for communications purposes and upon which many other character sets are based.

  2. Dependant Variables Identified

    widowed, divorced, separated - some have been married. A better interpretation may be to say that 51.4 percent (just over half) are currently married and 48.5 percent are currently not married. there are 4 (.1 percent) missing cases giving the code value 0. Highest educational qualifications (AQFEDHI) Sometimes the order of numbers attached to a variable is significant.

  • Over 160,000 pieces
    of student written work
  • Annotated by
    experienced teachers
  • Ideas and feedback to
    improve your own work