Comparison of Features Used in Programs


Length: 758 words (2.2 double-spaced pages)
Rating: Excellent
Open Document
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Text Preview

More ↓

Continue reading...

Open Document

Comparison of Features Used in Programs

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.
The following is an example in Pascal of how a variable is declared:

VAR RANKS:ARRAY [0..51] OF INTEGER;

SUITS:ARRAY [0..51] OF CHAR;

I:INTEGER;

In JavaScript the Variable are also declared in a similar way to
Pascal for example:

Var day=mydate.getDay();

This is the declaring of the variables, you can also assign values to
the variables.



Data Types: is a formal description of the kind of data being stored
or manipulated within a program or system, for example alphabetic
data, numeric data or logical data some of the more important one are
listed below.
=====================================================================

Number (integer): is any whole number, whether positive or negative.
In visual basic you can declare the number as an integer, for example:

Dim bookingNo As Integer

and this is the same in Pascal, for example

VAR I, J: INTEGER;

Number (real): is any number represented with a fractional part. In
most high-level languages, real indicates that floating-point
representation is to be used when the number is stored or manipulated.

How to Cite this Page

MLA Citation:
"Comparison of Features Used in Programs." 123HelpMe.com. 17 Jan 2017
    <http://www.123HelpMe.com/view.asp?id=149372>.

Related Searches





This implies that the number may contain a fractional part and that it
is processed to a limited number of significant figures.

This is used the same way in nearly all languages and doesn’t need to
be declared like an integer.

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.



Data Structures: is a group of related data items organised in a
computer. A data structure allows a large number of pieces of data to
be managed as a single set. Each type of data structure makes it easy
for the programmer to find and process the data in particular ways.
Each type of structure has its own strengths and weaknesses. Examples
of data structures are arrays, lists, tables, trees, strings and
files.
=====================================================================


String: is textual data in the form of a list of characters, for
example words and punctuation. String data is made up of characters
data and will usually vary in length.

String is basically a variable containing text for example:

Var dayarray=new

Array(“Sunday”,“Monday”,“Tuesday”,“Wednesday”,“Thursday”,“Friday”,“Saturday”)

The Var dayarray=new is basically a string containing text which has
been declared after that. This could be used later on in the program.

Array: is set of data items of the same type grouped together using a
single identifier. Each of the data items is addressed by the variable
name and a subscript.

An example of this is:

Dim cell (1 To 10000) 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.


Return to 123HelpMe.com