home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programming
/
powerprogramming1994.iso
/
progtool
/
pascal
/
pascsrc.arc
/
STRARRAY.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1988-01-15
|
823b
|
28 lines
(* Chapter 7 - Program 1 *)
program Pure_Pascal_Strings;
type Long_String = array[1..25] of char;
String10 = array[1..10] of char;
String12 = array[1..12] of char;
var First_Name : String10;
Initial : char;
Last_Name : String12;
Full_Name : Long_String;
Index : integer;
begin (* main program *)
First_Name := 'John ';
Initial := 'Q';
Last_Name := 'Doe ';
Writeln(First_Name,Initial,Last_Name);
for Index := 1 to 10 do
Full_Name[Index] := First_Name[Index];
Full_Name[11] := Initial;
for Index := 1 to 12 do
Full_Name[Index + 11] := Last_Name[Index];
for Index := 24 to 25 do Full_Name[Index] := ' ';
Writeln(Full_Name);
end. (* main program *)