<div dir="ltr"><div dir="ltr"><div>In section 8.2.4 of "The Programming Language Oberon" ("Relations") we read:</div><div><br></div>Relations are Boolean. The ordering relations <, <=, >, >= apply to the numeric types, CHAR, and character arrays. The relations = and # also apply to the types BOOLEAN, SET, and to pointer and
procedure types.</div><div dir="ltr"><br></div><div>I have a few questions on character arrays specifically.</div><div dir="ltr"><br></div><div>1. Is expression "ABC" = "ABC" correct and does it evaluate to TRUE? (This might be important in some cases.)</div><div>2. What if one of the character arrays is a variable and not a constant?</div><div>3. What if both character arrays are variables?</div><div>4. What if those character arrays (variables) have different length, though they hold logically-equal null-terminated strings?</div><div>5. What if one (or both) of the character arrays is an open array with different lengths?</div><div><br></div><div>For example:</div><div>VAR a, m: ARRAY 5 OF CHAR;</div><div> i: INTEGER;</div><div>BEGIN</div><div> FOR i := 0 TO 4 DO a[i] := 0X; m[i] := 0X END;</div><div> a[0] := "A";</div><div> m[0] := "A"; m[3] := "M";</div><div> IF a = m THEN ... END</div><div>END</div><div><br></div><div>Should we only compare characters before the first 0X?</div><div><br></div><div>Thanks!</div><div>Arthur</div></div>