Re: [fpc-pascal] Two questions about Pascal

2010-07-30 Thread Luca Olivetti
Al 30/07/10 00:12, En/na José Mejuto ha escrit: I was looking for a "with" like: with TNX(a) "named" as TNX_a do begin with TNXX(b) "named" as TNXX_b do begin TNX_a.OP1:=TNXX_b.OP2; TNXX_b.OP3:=TNX_a.OP2; [.] end; end; But I think that there is nothing like that in Pas

Re[2]: [fpc-pascal] Two questions about Pascal

2010-07-29 Thread José Mejuto
Hello FPC-Pascal, Thursday, July 29, 2010, 8:54:44 PM, you wrote: >> 1) Is there any way in Pascal to write something like this >> (pseudocode): >> >> With Result:=Object.Create() do begin >> Free; >> end; JM> Just leave out the "Result:=" part and it will compile/work fine.. I was looking fo

Re: [fpc-pascal] Two questions about Pascal

2010-07-29 Thread Jonas Maebe
On 29 Jul 2010, at 20:31, José Mejuto wrote: > 1) Is there any way in Pascal to write something like this > (pseudocode): > > With Result:=Object.Create() do begin > Free; > end; Just leave out the "Result:=" part and it will compile/work fine.. > 2) Which is the expected way to detect if a f

[fpc-pascal] Two questions about Pascal

2010-07-29 Thread José Mejuto
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