record result I



record_result I
Smart pascal source code
type TMonRecord = record Nom: string; Blabla: string end; var i: Integer; function GetUnRecord(): TMonRecord; begin result.Nom := 'azerty'; result.Blabla := IntToStr(i); i := i + 1; end; var toto: TMonRecord; toto := GetUnRecord(); WriteLn(toto.Nom); WriteLn(toto.Blabla); toto := GetUnRecord; WriteLn(toto.Nom); WriteLn(toto.Blabla); WriteLn(GetUnRecord.Nom); WriteLn(GetUnRecord.Blabla); {<<< RESULT - CONSOLE LOG >>> ----------------------------- Errors >>>> Hint: "result" does not match case of declaration ("Result") [line: 11, column: 4] Hint: "result" does not match case of declaration ("Result") [line: 12, column: 4] Result >>>> azerty 0 azerty 1 azerty 3 ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}