Memory Variable
Variables are explicitly named memory vocations variables, the free pascal compile generates machine code to move the vaalue to the memory location reserved for these variables.
A memory variable is the name for a place in the computer's memory where you store some data.
Variable types:
In modern programming languages, variables are declared to be of a type.
Apart from numbers, the CPU does not make any kind of distinction about the data in its memory. It treats it as a collection of bytes. Modern CPUs (apart from those in mobile phones) can usually handle both integer and floating point arithmetic in hardware. The compiler has to generate different machine code instructions for each type, so knowing what the type of variable helps it generate optimal code.
What Types of Data Can a Variable Hold?: The fundamental types are these four.
· Integers (both signed and unsigned) 1,2,4 or 8 bytes in size. Usually referred to as ints.
· Floating Point Numbers up to 8 bytes in size.
· Bytes. These are organised in 4s or 8s (32 or 64 bits) and read in and out of the CPU's registers.
· Text strings, up to billions of bytes in size. CPUs have special instructions for searching through large blocks of bytes in memory. This is very handy for text operations.
Example of Data Types:
· Arrays of types- single dimension like drawers in a cabinet, two dimensional like post office sorting boxes or three dimensional like a pile of beer crates. There can be any number of dimensions, up to the limits of the compiler.
· Enums which are a restricted subset of integers.
· See What is an Enum?
· Structs are a composite variable where several variables are lumped together in one big variable.
· Streams provide a way to manage files. They're a form of string.
· Objects. Like structs but with much more sophisticated data handling.
Data Field
-An area in the main memory of the computer in which a data record is contained.
In the structure of a database, the smallest component under which data is entered through data capture or data entry. All data fields in the same database have unique names, several data fields make up a data record, several data records make up a data file, and several data files make up a database.
Sunday, June 28, 2009
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment