[fpc-pascal] Two questions about Pascal

José Mejuto joshyfun at gmail.com
Thu Jul 29 20:31:12 CEST 2010


Hello FPC-Pascal,

Two "simple" questions.

1) Is there any way in Pascal to write something like this
(pseudocode):

With Result:=Object.Create() do begin
  Free;
end;

Which will be written without the "with" as:

Result:=Object.Create();
Result.Free;

2) Which is the expected way to detect if a float value is exact ?
Maybe only applying "if V = trunc(V) then ..." ?

Thank you for your time.

-- 
Best regards,
 José




More information about the fpc-pascal mailing list