next up previous contents index
Next: Int Up: Functions and Procedures Previous: Inc

Insert

   

Declaration:

Procedure Insert (Var Source : String;var S : String;Index : integer) ;

Description:

Insert inserts string S in string Source, at position Index, shifting all characters after Index to the right. The resulting string is truncated at 255 characters, if needed.

Errors:

None.

See also:

Delete, Copy, Pos

Example
Program Example33;

{ Program to demonstrate the Insert function. }

Var S : String;

begin
  S:='Free Pascal is difficult to use !';
  Insert ('NOT ',S,pos('difficult',S));
  writeln (s);
end.



Michael Van Canneyt
Thu Sep 10 14:02:43 CEST 1998