Re: [fpc-pascal] inline declarations...

2020-03-11 Thread geneb
On Wed, 11 Mar 2020, Marco van de Voort wrote: Op 2020-03-11 om 16:04 schreef geneb: Op 2020-03-11 om 15:52 schreef geneb: Will v3.2 support inline variable declarations? No. Thanks for the quick reply Marco! Is that "No" as in "never" or just "maybe > 3.2"? Not (yet) never, but not an

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread Sven Barth via fpc-pascal
schrieb am Mi., 11. März 2020, 16:37: > On 3/11/20 11:35 AM, fredvs via fpc-pascal wrote: > >> f (kind in tabulatorkindty) then > > > > Yes, I like it! > > > > But, sadly, the compiler no. > > > > "Error: Operator is not overloaded"... > > > that's weird... i thought that construct was standard f

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread wkitty42
On 3/11/20 11:35 AM, fredvs via fpc-pascal wrote: f (kind in tabulatorkindty) then Yes, I like it! But, sadly, the compiler no. "Error: Operator is not overloaded"... that's weird... i thought that construct was standard for arrays and similar... hummm... -- NOTE: No off-list assistan

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread fredvs via fpc-pascal
> f (kind in tabulatorkindty) then Yes, I like it! But, sadly, the compiler no. "Error: Operator is not overloaded"... Fre;D - Many thanks ;-) -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pas

Re: [fpc-pascal] inline declarations...

2020-03-11 Thread Marco van de Voort
Op 2020-03-11 om 16:04 schreef geneb: Op 2020-03-11 om 15:52 schreef geneb: Will v3.2 support inline variable declarations? No. Thanks for the quick reply Marco! Is that "No" as in "never" or just "maybe > 3.2"? Not (yet) never, but not anytime soon in any version. The feature is consid

Re: [fpc-pascal] inline declarations...

2020-03-11 Thread geneb
On Wed, 11 Mar 2020, Marco van de Voort wrote: Op 2020-03-11 om 15:52 schreef geneb: Will v3.2 support inline variable declarations? No. Thanks for the quick reply Marco! Is that "No" as in "never" or just "maybe > 3.2"? tnx. g. -- Proud owner of F-15C 80-0007 http://www.f15sim.com - T

Re: [fpc-pascal] inline declarations...

2020-03-11 Thread Marco van de Voort
Op 2020-03-11 om 15:52 schreef geneb: Will v3.2 support inline variable declarations? No. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] inline declarations...

2020-03-11 Thread geneb
Will v3.2 support inline variable declarations? tnx. g. -- Proud owner of F-15C 80-0007 http://www.f15sim.com - The only one of its kind. http://www.diy-cockpits.org/coll - Go Collimated or Go Home. Some people collect things for a hobby. Geeks collect hobbies. ScarletDME - The red hot Data

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread wkitty42
On 3/11/20 7:51 AM, fredvs via fpc-pascal wrote: if (kind = tabulatorkindty(tak_lef)) or (kind = tabulatorkindty(tak_right)) or (kind = tabulatorkindty(tak_centered)) or (kind = tabulatorkindty(tak_decimal)) then But I would prefer a shorter way, mainly if the array is big. admittedly i don't

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread fredvs via fpc-pascal
> You are abusing enums. Either use them correctly or not at all Hum, it is not my code but, yes I understood, I will fix it with the "good boy" way. Thanks for all that clear, fast and with solutions answers. Fre;D - Many thanks ;-) -- Sent from: http://free-pascal-general.1045716.n5

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread Sven Barth via fpc-pascal
fredvs via fpc-pascal schrieb am Mi., 11. März 2020, 13:25: > By the way, huh, yes, if I am totally sure that the code is safe, I would > be > happy to know the code-number of those Warning and disable it. > > Of course in last resort (no time to be lazy). > You can find out any message id by co

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread Sven Barth via fpc-pascal
fredvs via fpc-pascal schrieb am Mi., 11. März 2020, 12:51: > > Other question relative to Warnings: > > How to do this: > > tdataevent(de_afterapplyupdate) > > where TDataEvent is defined as > > TDataEvent = (deFieldChange, deRecordChange, deDataSetChange, > deDataSetScroll, deLayoutChange,

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread Sven Barth via fpc-pascal
fredvs via fpc-pascal schrieb am Mi., 11. März 2020, 11:16: > Hello. > > Compiling that code with fpc 3.2.0 gives the warning that follows: > > ---> if (kind <> tabulatorkindty(-1)) --> gives now the warning: > > "msedrawtext.pas(1115,48) Warning: range check error while evaluating > constants (

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread Michael Van Canneyt
On Wed, 11 Mar 2020, fredvs via fpc-pascal wrote: Thanks Michael. You'll need to disable that particular warning if you want to use such tricks. For the "-1" trick, it can be easy fixed with if (kind = tabulatorkindty(tak_lef)) or (kind = tabulatorkindty(tak_right)) or (kind = tabulato

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread fredvs via fpc-pascal
Thanks Michael. > You'll need to disable that particular warning if you want to use such > tricks. For the "-1" trick, it can be easy fixed with if (kind = tabulatorkindty(tak_lef)) or (kind = tabulatorkindty(tak_right)) or (kind = tabulatorkindty(tak_centered)) or (kind = tabulatorkindty(tak_

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread Michael Van Canneyt
On Wed, 11 Mar 2020, fredvs via fpc-pascal wrote: Do it properly, and add a tab_None or somesuch If I may, I would prefer "somesuch" vs adding a new constant. Of course you may. It is a free world. But, really, would it not possible to write the equivalent of if (kind <> tabulatorkin

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread fredvs via fpc-pascal
> Do it properly, and add a tab_None or somesuch If I may, I would prefer "somesuch" vs adding a new constant. But, really, would it not possible to write the equivalent of if (kind <> tabulatorkindty(-1)) then Maybe using in this case: if (kind = tabulatorkindty(tak_lef)) or (kind = tabulato

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread Michael Van Canneyt
On Wed, 11 Mar 2020, fredvs via fpc-pascal wrote: Re-hello. What must be changed, a new constant should be added at end of the array, Lot of work because with this the array must be initialized with tak_none. But maybe there is now a new fpc trick to write: --> if (kind <> tabulatorkindt

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread Marco van de Voort
Op 2020-03-11 om 11:44 schreef fredvs via fpc-pascal: PS: Imho, using "-1" was a nice trick and it is sad that it cannot more be used. It is a warning not an error. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepasca

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread fredvs via fpc-pascal
Re-hello. > What must be changed, a new constant should be added at end of the array, Lot of work because with this the array must be initialized with tak_none. But maybe there is now a new fpc trick to write: --> if (kind <> tabulatorkindty(-1)) That will say "if kind is different of somethi

[fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread fredvs via fpc-pascal
Hello. Compiling that code with fpc 3.2.0 gives the warning that follows: ---> if (kind <> tabulatorkindty(-1)) --> gives now the warning: "msedrawtext.pas(1115,48) Warning: range check error while evaluating constants (-1 must be between 0 and 3)" tabulatorkindty is declared as: ---> tabulat