• Image 1
  • Image 2
  • Image 3
  • Image 4
  • Image 5
  • Image 6
  • Image 7




Thursday, August 23, 2012

PASCAL - SAMPLE PROGRAM SET

Hello… introduce this is my blog…. And name of “We Are Knowledge”.. you was entry previously ???...if not… I want giving you little information about this blog… My blog is place for sharing IT knowledge or general knowledge.. The IT knowledge can be web programming or dekstop programming… And for general knowledge, I was include receip Indonesian foods..

Likely this article… I want giving you IT knowledge about “PASCAL” and discuss of “SET”. Previously I was giving you IT knowledge about it.. but, now.. I want making example program using ”SET”.. you wantto know ?? let’s do read my article… have fun for reading yeahh…

This is example from using statement set in pascal… you can copy this coding in your aplication likely “turbo pascal”  or you can too copy this coding in “notepad” or “notepad++”…


Example 1 :

Uses crt;
Type kbil=set of byte;
var kabil1,kabil2 : kbil;
a,b:byte;
begin
clrscr;
writeln ('           Hello visitors');
writeln ('This is example from statement SET program');
writeln ('          survivors studied');
writeln;
writeln;
writeln ('PAGE 1');
write ('Please Input Your Number For Upper Limit : '); readln(a);
write ('Please Input Your Number For Lower Limit : '); readln(b);
kabil1 := [a..b];
writeln;
writeln ('PAGE 2');
write ('Please Input Your Number For Upper Limit :');readln(a);
write ('Please Input Your Number For Lower Limit :');readln(b);
kabil2 := [a..b];
writeln;
writeln;
if kabil1 =  kabil2 then writeln ('set on page one of each with the set on page two');
if kabil1 <> kabil2 then writeln ('set on page one is not the same as the one set on page two');
if kabil1 <= kabil2 then writeln ('set on page one member of the set on page two');
if kabil1 >= kabil2 then writeln ('set on page one have a member of the set on page two');
readln;
end.



Note :

Please change quotes likely this (“ “) or this (‘ ‘), if you using copy and paste
If  you copy in notepad or notepad ++, please save with save as type = “pas”. Ex : “set.pas”
To compile >> alt  + F9
To running >> ctrl + F9



Ok.. just it…
Have fun to learn…
See you later.

No comments:

Post a Comment