[comp.lang.modula2] AssignStr

George.Emery@p42.f369.n105.z1.fidonet.org (George Emery) (06/26/90)

AssignStr (or some equivalent) is usually used to assign an ARRAY OF CHAR
to another which has a different range of indices.  The following code
fragment works iff HIGH(a) = HIGH(b) (and maybe only if the indices exactly
match):

a := "this is one string";
b := "this is another";
b := a;

Instead of fighting a compiler error, one merely uses AssignStr(b, a) in place
of b := a.  The compilers which provide a string module include this as one
of the first functions.


--  
uucp: uunet!m2xenix!puddle!369.42!George.Emery
Internet: George.Emery@p42.f369.n105.z1.fidonet.org