| 1234567891011121314151617181920212223242526 |
- program t110_insert;
- { t110 -- Insert(Source, Dest, Index): char and string sources, middle/end/
- front, and index clamping. }
- var
- S : string[20];
- C : char;
- begin
- S := 'ace';
- C := 'b';
- Insert (C, S, 2);
- writeln (S);
- S := 'ace';
- Insert ('b', S, 2);
- writeln (S);
- S := 'ace';
- Insert ('XY', S, 4);
- writeln (S);
- S := 'ace';
- Insert ('Z', S, 99);
- writeln (S);
- S := 'ace';
- Insert ('Z', S, 0);
- writeln (S)
- end.
|