Category : Pascal Source Code
Archive   : TPTC17TC.ZIP
Filename : FINDCHRS.PAS

 
Output of file : FINDCHRS.PAS contained in archive : TPTC17TC.ZIP

(*
* Example of sets of characters
*
*)

program Find_All_Lower_Case_Characters;

const
String_Size = 30;

type
Low_Set = set of 'a'..'z';

var
Data_Set : Low_Set;
Storage : string[String_Size];
Index : 1..String_Size;
Print_Group : string[26];

begin (* main program *)
Data_Set := [];
Print_Group := '';
Storage := 'This is a set test.';

for Index := 1 to Length(Storage) do begin
if Storage[Index] in ['a'..'z'] then begin
if Storage[Index] in Data_Set then
Writeln(Index:4,' ',Storage[Index],
' is already in the set')
else begin
Data_Set := Data_Set + [Storage[Index]];
Print_Group := Print_Group + Storage[Index];
Writeln(Index:4,' ',Storage[Index],
' added to group, complete group = ',
Print_Group);
end;
end
else
Writeln(Index:4,' ',Storage[Index],
' is not a lower case letter');
end;
end. (* of main program *)


  3 Responses to “Category : Pascal Source Code
Archive   : TPTC17TC.ZIP
Filename : FINDCHRS.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/