Hello hello visitors… You are in my blog on “We Are
Knowledge”…You are was the right blog, and I hope you getting what do you
looking for…
Likely name of my blog. In here to be found many IT
knowledge, from IT knowledge deksopt programming until based web programming.. Moreover
I also provided the general knowledge, likely receip Indonesian foods…
But, this time I want giving you IT knowledge about dekstop
programming, that is program language “Pascal”. And discuss of “SET in Pascal”…
you know previous about it… ?? if no, let’s do read my article.. have fun for
reading ….
Set in Pascal is set of values that have similarities -
similarities in the nature, meaning that the same data type (nature) and the
order of the writing does not have to be considered. Every object - the object
in the set can be considered as members or elements of the set.
Example For Set :
1. odd
number of 100 to 999
2. letters
- letters on a computer keyboard
3. name
- the name of the month in the calendar
4. four-wheeled
vehicles
5. online
games on your computer or ofline
Set the type of unstructured data contained in pascal, which
is composed of several elements that have the same data type.
Set in pascal programming language similar to arrays in
pasacl statement, SET is not only affected by the first element and the SET
data type is no element with the same
SET declaration :
Type variabel_of_set = SET OF
tipe_data;
OR
Var
variabel_of_set = SET OF tipe_data;
This is example using set in PASCAL
Example1 :
Type
Word_of_set = set
of integer; {tipe dasar using type “integer”}
upper case =‘A’..’Z’; {subrange}
Command = set
of upper case;
moon =
(January, February, March, April, May, June, July, august, september, october,
november, december); { enumeration }
moon2 =
set of moon;
option = set of 1..12 {subrange in
the form of numbers };
Var
lowercase :
set of ‘a’..’z’;
Capital :
upper_case ;
moon : moon2;
sentence : word;
Ok..just it…
I hope you undesrtand with my article…
See you later friends
No comments:
Post a Comment