|
@@ -7,10 +7,11 @@ Const LONG_STR_SIZE=4096;
|
|
|
|
|
|
Type tLongStr=Object // try to change this
|
|
Type tLongStr=Object // try to change this
|
|
// to Record
|
|
// to Record
|
|
- LStr:Array[1..LONG_STR_SIZE] Of Char;
|
|
|
|
|
|
+ LStr:Array[0..LONG_STR_SIZE] Of Char;
|
|
LLength:Longint;
|
|
LLength:Longint;
|
|
End;
|
|
End;
|
|
|
|
|
|
|
|
+
|
|
Operator := (S:String) R:tLongStr;
|
|
Operator := (S:String) R:tLongStr;
|
|
Begin
|
|
Begin
|
|
R.LLength:=Length(S);
|
|
R.LLength:=Length(S);
|
|
@@ -21,4 +22,12 @@ Var T:tLongStr;
|
|
|
|
|
|
Begin
|
|
Begin
|
|
T:='Hello';
|
|
T:='Hello';
|
|
|
|
+ if (T.LLength<>5) or
|
|
|
|
+ (T.LStr[1]<>'H') or
|
|
|
|
+ (T.LStr[5]<>'o') then
|
|
|
|
+ begin
|
|
|
|
+ writeln('Error!');
|
|
|
|
+ halt(1);
|
|
|
|
+ end;
|
|
|
|
+
|
|
End.
|
|
End.
|