Information Technology Reference
In-Depth Information
The line
account-number integer( 9)
has the variable
account-number ,
which is the first field in our record or structure. Because of the way the structure is
defined, this means that the field
account-number
starts in the very first position of the record. The keyword
integer (9)
spells out that the field is a number consisting of 9 digits. As you may have guessed
integer
is another keyword. Any number that is an integer is a whole number, which can be 0.
The next line,
last-name character (18)
is quite similar except this field is not numeric but rather consists of letters of the
alphabet. The keyword
character
is all encompassing and just about any symbol will be allowed in using it, even a number
- even though, as I write this, people don't have numbers as part of their name. Seinfeld
fans, that show is fantasy. Later, we'll see that numbers in the last name, first name or
middle initial aren't allowed, even though this keyword will include numbers and special
characters. Note that this field contains 18 characters maximum. If the last name
happened to be
Smith,
last-name
would consist of the letters “Smith ”, that is, those five letters followed by 13
spaces.
The variable
first-name
is similar to
last-name
except that it only has 15 characters.
middle-initial
is a single character, so we could have spelled this out as
character (1)
but
character
represents a single position as well. The next four fields mirror the others above them, as
they are either
character
or
integer .
Note that both variables
account-number
Search WWH ::




Custom Search