record var param 1



record_var_param1
Smart pascal source code
type TRec = record F1, F2: Integer; procedure WriteLnIt; begin WriteLn(F1); WriteLn(','); WriteLn(F2); end; end; var r, r1, r2: TRec; r1.F1 := 1; r1.F2 := 2; r2.F1 := 10; r2.F2 := 20; procedure CopyRec(const src: TRec; var dest: TRec); begin dest := src; end; CopyRec(r1, r); r.WriteLnIt; CopyRec(r2, r); r.WriteLnIt; var a: array [0 .. 1] of TRec; CopyRec(r1, a[0]); CopyRec(r2, a[1]); a[0].WriteLnIt; a[1].WriteLnIt; {<<< RESULT - CONSOLE LOG >>> ----------------------------- 1,2 10,20 1,2 10,20 ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}