Strings

a) The keyword %string may always be followed by a length specification. Thus %string(10)%array %name .... and %string(255)%name ...... are permitted. In EMAS 2900 IMP80, no use is made of the maximum length specification for string name and string array name variables.
[In other IMP80 implementations, however, a string name variable must have a maximum length specification and can only refer to ("be pointed at") a string variable of the SAME maximum length. The forms %string(*)%array %name ..... %string(*)%name ........... are also provided, however, to enable declarations of reference variables which can point at any string variable.]
b) The string function FROMSTRING is renamed SUBSTRING. c) A string resolution of the form S -> (A).B succeeds in IMP9 only if string S starts with string expression A. In IMP80, however, the resolution is interpreted as being equivalent to S -> JUNK.(A).B where JUNK is a "hidden" string(255) variable; that is, the resolution will succeed if A appears ANYWHERE within S. When converting an IMP9 program to IMP80, the following translation is recommended: %if S -> (B).C %then ... in IMP9 becomes %if S -> NS1.(B).NS2 %and NS1="" %then C=NS2 %and ... in IMP80 [NS1 and NS2 are new %string(255) variables]
This translation is still valid when the IMP9 statement is %if S -> (B).S %then ... i.e. when C is S. Unconditional resolutions can normally remain unchanged; they might succeed in IMP80 where they would fail in IMP9, but this is not significant unless you are expecting them to fail.