Re: [fpc-pascal] Docs: portability differences between Borland/FPC

2018-08-18 Thread Martok
Am 18.08.2018 um 23:39 schrieb Florian Klämpfl: >> This is plainly wrong, at least for the older delphis, the host type in >> delphi will be Byte (or even Shortint). > > It is actually shortint ... Correct, I was thinking of the default PackEnum. Which of course has absolutely nothing to do

Re: [fpc-pascal] Auto vars (again)

2018-08-18 Thread Ryan Joseph
> On Aug 18, 2018, at 11:04 AM, Ryan Joseph wrote: > >> The solution which probably should be accepted by fpc team is default >> property without indexer: >> >> === code begin === >> property obj: T read fobj; default; >> === code end === >> >> with this property should be possible: >> >>

Re: [fpc-pascal] Docs: portability differences between Borland/FPC

2018-08-18 Thread Bart
On Sat, Aug 18, 2018 at 11:52 PM, Bart wrote: > TurboPascal 6.0 will not do that. It will execute the else statment if Just ignore my above post. Made a typo in the if condition Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Docs: portability differences between Borland/FPC

2018-08-18 Thread Bart
On Sat, Aug 18, 2018 at 10:59 PM, Martok wrote: > There is the old "Porting TP" document at > , but it is rather incomplete (and > probably on an > older language level). It also covers mostly syntactic differences - things a > programmer will notice

Re: [fpc-pascal] Docs: portability differences between Borland/FPC

2018-08-18 Thread Florian Klämpfl
Am 18.08.2018 um 23:26 schrieb Florian Klämpfl: Am 18.08.2018 um 22:59 schrieb Martok: Hi all, There is the old "Porting TP" document at , but it is rather incomplete (and probably on an older language level). It also covers mostly syntactic differences -

Re: [fpc-pascal] Docs: portability differences between Borland/FPC

2018-08-18 Thread Florian Klämpfl
Am 18.08.2018 um 22:59 schrieb Martok: Hi all, There is the old "Porting TP" document at , but it is rather incomplete (and probably on an older language level). It also covers mostly syntactic differences - things a programmer will notice because of the

Re: [fpc-pascal] Docs: portability differences between Borland/FPC

2018-08-18 Thread Marco van de Voort
In our previous episode, Martok said: > There is the old "Porting TP" document at > , but it is rather incomplete (and > probably on an older language level). It also covers mostly syntactic > differences - things a programmer will notice because of the error

[fpc-pascal] Docs: portability differences between Borland/FPC

2018-08-18 Thread Martok
Hi all, There is the old "Porting TP" document at , but it is rather incomplete (and probably on an older language level). It also covers mostly syntactic differences - things a programmer will notice because of the error messages. Since #34140 was again

Re: [fpc-pascal] Auto vars (again)

2018-08-18 Thread Ryan Joseph
> On Aug 17, 2018, at 7:50 PM, Maciej Izak wrote: > > class operator Initialize(var a: TAutoCreate); > class operator Finalize(var a: TAutoCreate); > One other thing I wanted to ask you. I know it’s minor but for me it’s pretty disappointing that the Initialize and Finalize

Re: [fpc-pascal] Auto vars (again)

2018-08-18 Thread Marcos Douglas B. Santos
On Sat, Aug 18, 2018 at 2:04 PM, Ryan Joseph wrote: > > How does TAutoFree in mORMot work? Never heard of this. See http://blog.synopse.info/post/2014/11/14/Automatic-TSQLRecord-memory-handling regards, Marcos Douglas ___ fpc-pascal maillist -

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-18 Thread Ryan Joseph
> On Aug 17, 2018, at 7:19 PM, Sven Barth via fpc-pascal > wrote: > > However for classes there is the problem of temporary variables. Take a := b > + c + d. That is essentially compiled as t := b + c; a := t + d. The compiler > does not know whether the operator creates an instance or not

Re: [fpc-pascal] Auto vars (again)

2018-08-18 Thread Ryan Joseph
> On Aug 17, 2018, at 7:50 PM, Maciej Izak wrote: > > 2018-08-18 1:24 GMT+02:00 Ryan Joseph : > but is there any merit to this idea if it was cleaned up and made safe? I did > some tests to see if you could prevent passing auto vars out of scope and > it’s possible to prevent most ways but

Re: [fpc-pascal] Branch table

2018-08-18 Thread Marco Borsari via fpc-pascal
Il 17/08/2018 18:04, Giuliano Colla ha scritto: I modified your code, to add a jump table (as it is in the example you mention) I came to that program branch; {$ASMMODE intel} label tab,stop,a,b,c; var idx:byte; begin write('Index? '); readln(idx); asm xor eax,eax; mov al,idx; shl ax,2; mov

Re: [fpc-pascal] Branch table

2018-08-18 Thread Marco Borsari via fpc-pascal
Il 17/08/2018 18:04, Giuliano Colla ha scritto: Enjoy programming! Giuliano Thank you! ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Auto vars (again)

2018-08-18 Thread Maciej Izak
2018-08-18 1:24 GMT+02:00 Ryan Joseph : > but is there any merit to this idea if it was cleaned up and made safe? I > did some tests to see if you could prevent passing auto vars out of scope > and it’s possible to prevent most ways but not 100%. > You are trying to achieve something what is

Re: [fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

2018-08-18 Thread Michael Van Canneyt
On Sat, 18 Aug 2018, Bo Berglund wrote: On Sat, 18 Aug 2018 03:19:55 +0200, Sven Barth via fpc-pascal wrote: In Delphi objects are deprecated Huh? ObjectPascal deprecating objects? Sounds far-fetched. Old-style TP Objects are deprecated, but classes are not. Michael.