Hello visitors, you are visiting in my blog, ie there “We
Are Knowledge”.. maybe you will getting what do you find…
Yeah, that right in here is blog about IT knowledge. Although
most about IT knowledge, but I was provided you about general knowledge likely
receip Indonesian foods.
And IT knowledge I was provided is web programming and
dekstop programming. And example program language like as : pascal, php, mysql,
html, cobol, c++. And if you likely all about design graphic you can go to
place of “adobe photoshop”.
Now, I want giving you program language “pascal” and discuss
about “RECORD”. You know record in PASCAL ?? yeah, that right RECORD in pascal
is Records can be considered as a set of data items, each of which has
different data types from one another, but these data types can also be created
equal.
Data items are elements usually called FIELD record. or
FIELD is a collection of several records. Or more easely record is the smallest part of the file.
“character
>> record >> field >> file”.
DECLARATION RECORD
For the general form of a variable declaration record type
is as follows:
TYPE identifier = RECORD
Name_of_field_1: type_of_record;
Nama_of_field_2: type_of_record;
Name_of_field_3: type_of_record;
Name_of_field_4: type_of_record;
..........................
..........................
name_of_field_n: type_of_record;
END;
Example 1 :
VAR value
: RECORD
value_1 : integer;
value_2 : integer;
value_3 : integer;
value_4 : integer;
END;
Example 2 :
TYPE date = RECORD
day : 1..31;
moon : 1…12;
year
: 1900..2000;
END;
Example 3 :
TYPE goods =
RECORD
cust_no :
integer;
cust_type :
char;
cust_balance :
real;
VAR customer : goods;
END;
Example 4 :
TYPE time = RECORD
second : 1..60;
minute : 1…60;
hour
: 1…24;
END;
For this example using statement “array”.
Example 5 :
VAR event1,event2 :
ARRAY [1..10] OF date;
Ok… just it…
I hope you like with my article…
Don’t forget to foll back in my page…
See you later…
No comments:
Post a Comment