ISaGRAF. Version 3.4


REPLACE


:

IN MSG

Str MSG ,

NbC INT ,

Pos INT

( 1)

Q MSG :

-NbC Pos

- Str

Pos <= 0

(IN+Str) Pos , IN

IN NbC <= 0

:

.

(*FBD REPLACE*)

(* ST : *)

MyName := REPLACE ('Mr X JONES, 'Frank', 1, 4);

(* MyName - 'Mr Frank JONES' *)

(* IL : *)

LD 'Mr X JONES'

REPLACE 'Frank',1,4

ST MyName