Re: [fpc-pascal] Range check error warning.

2020-03-25 Thread Bart via fpc-pascal
On Wed, Mar 25, 2020 at 10:30 PM wrote: > what? you don't like laughing bearded guys? LUL means penis (and I'm putting it nicely here) in Dutch. Google translate translates it as either asshole (anatomically rahter incorrect), cock, or prick. -- Bart __

Re: [fpc-pascal] Range check error warning.

2020-03-25 Thread Sven Barth via fpc-pascal
schrieb am Mi., 25. März 2020, 19:48: > On 3/25/20 2:17 PM, Sven Barth via fpc-pascal wrote: > > wkitt...@windstream.net schrieb am Mi., 25. März 2020, 18:47: > > > >> hummm... ok, so how to you get a constant to be a byte and storing 7 > for the > >> decimal value? > > > > > > The compiler norma

Re: [fpc-pascal] Range check error warning.

2020-03-25 Thread wkitty42
On 3/25/20 5:06 PM, Bart via fpc-pascal wrote: On Wed, Mar 25, 2020 at 7:48 PM wrote: [wargames] seems like the winning move is to not play the game. [/wargames] LUL LUL ?? What does that stand for? it is the LOL emoticon with a beard... i've gotten to where i use it all the time instead

Re: [fpc-pascal] Range check error warning.

2020-03-25 Thread Bart via fpc-pascal
On Wed, Mar 25, 2020 at 7:48 PM wrote: > [wargames] seems like the winning move is to not play the game. [/wargames] > LUL LUL ?? What does that stand for? Better not say that to someone who speaks Dutch (like me) ;-)) -- Bart ___ fpc-pascal mailli

Re: [fpc-pascal] Range check error warning.

2020-03-25 Thread wkitty42
On 3/25/20 2:17 PM, Sven Barth via fpc-pascal wrote: wkitt...@windstream.net schrieb am Mi., 25. März 2020, 18:47: hummm... ok, so how to you get a constant to be a byte and storing 7 for the decimal value? The compiler normally uses the smallest possible type that can represent the value.

Re: [fpc-pascal] Range check error warning.

2020-03-25 Thread Howard Page-Clark via fpc-pascal
On 25/03/2020 17:46, wkitt...@windstream.net wrote: On 3/24/20 6:58 PM, Sven Barth via fpc-pascal wrote: wkitt...@windstream.net schrieb am Di., 24. März 2020, 18:37: you should figure out why typed constants are not being allowed/used in your setup... Typed constants can not be used to init

Re: [fpc-pascal] Range check error warning.

2020-03-25 Thread Sven Barth via fpc-pascal
schrieb am Mi., 25. März 2020, 18:47: > On 3/24/20 6:58 PM, Sven Barth via fpc-pascal wrote: > > wkitt...@windstream.net schrieb am Di., 24. März 2020, 18:37: > > > >> you should figure out why typed constants are not being allowed/used > >> in your setup... > > > > Typed constants can not be use

Re: [fpc-pascal] Range check error warning.

2020-03-25 Thread wkitty42
On 3/24/20 6:58 PM, Sven Barth via fpc-pascal wrote: wkitt...@windstream.net schrieb am Di., 24. März 2020, 18:37: you should figure out why typed constants are not being allowed/used in your setup... Typed constants can not be used to initialize constants. hummm... ok, so how to you get a

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread Sven Barth via fpc-pascal
Am 24.03.2020 um 01:08 schrieb fredvs via fpc-pascal: Hello. With fpc 3.3.1 there is this warning: "Warning: (4110) Range check error while evaluating constants (-193 must be between 0 and 255)" Here the code pointed by the warning: const foldhiddenbit = 7; foldhiddenmask = 1 shl foldhidd

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread Sven Barth via fpc-pascal
schrieb am Di., 24. März 2020, 18:37: > On 3/24/20 12:40 PM, fredvs via fpc-pascal wrote: > > Hello Alexander. > > > > I did: > > > > const > > foldhiddenbit : byte = 7; // line 896 > > foldhiddenmask : byte = 1 shl foldhiddenbit; // line 897 > > currentfoldhiddenbit : byte = 6; // li

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread fredvs via fpc-pascal
Many thanks Gerhald. Now I have to deeply study your code, I did not catch all at first glance. Write you later. Fre;D - Many thanks ;-) -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal@list

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread Gerhard Scholz
there is clearer - Original Message - From: "fredvs via fpc-pascal" To: Cc: "fredvs" Sent: Tuesday, March 24, 2020 8:59 PM Subject: Re: [fpc-pascal] Range check error warning. what about foldlevelmask = (not (foldhiddenmask or currentfoldhiddenmask)) and $ff

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread fredvs via fpc-pascal
> what about > foldlevelmask = (not (foldhiddenmask or currentfoldhiddenmask)) and $ff ; Ha, this one fpc 3.3.1 like it! No more warning nor error. May I ask you what "and $ff" does, is it the same as "abs()" or keep it the negative value? Many thanks. Fre;D - Many thanks ;-) -- Sent

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread Gerhard Scholz
what about foldlevelmask = (not (foldhiddenmask or currentfoldhiddenmask)) and $ff ; instead of the " f... := byte(...) " line ? - Original Message - From: "fredvs via fpc-pascal" To: Cc: "fredvs" Sent: Tuesday, March 24, 2020 1:08 AM Subject:

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread fredvs via fpc-pascal
> perhaps calculate those results by hand and assign them.. then fix it later? hehe Yes, that is the thing with the gurus, it must seem complicated. I agree that writing this: > foldlevelmask = byte(not (foldhiddenmask or currentfoldhiddenmask)); is much more impressive than writing this: > f

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread Alexander Grotewohl
: fredvs Subject: Re: [fpc-pascal] Range check error warning. > what mode are you compiling with? {$mode objfpc}{$h+} - Many thanks ;-) -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pas

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread fredvs via fpc-pascal
> what mode are you compiling with? {$mode objfpc}{$h+} - Many thanks ;-) -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/list

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread wkitty42
On 3/24/20 12:40 PM, fredvs via fpc-pascal wrote: Hello Alexander. I did: const foldhiddenbit : byte = 7; // line 896 foldhiddenmask : byte = 1 shl foldhiddenbit; // line 897 currentfoldhiddenbit : byte = 6; // line 898 currentfoldhiddenmask : byte = 1 shl currentfoldhiddenbit;

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread Bart via fpc-pascal
On Tue, Mar 24, 2020 at 6:00 PM fredvs via fpc-pascal wrote: > OK, I stop. This works? {$mode objfpc} {$apptype console} const foldhiddenbit = byte(7); foldhiddenmask = byte(1 shl foldhiddenbit); currentfoldhiddenbit = byte(6); currentfoldhiddenmask = byte(1 shl currentfoldhiddenbit);

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread fredvs via fpc-pascal
This make the compiler happy: foldlevelmask = byte(abs(not (foldhiddenmask or currentfoldhiddenmask))); Not sure it is better to do abs() but so no more warning. Let's fix with it? - Many thanks ;-) -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ __

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread fredvs via fpc-pascal
And doing this: foldhiddenbit = byte(7); foldhiddenmask = byte(1 shl foldhiddenbit); currentfoldhiddenbit = byte(6); currentfoldhiddenmask = byte(1 shl currentfoldhiddenbit); foldlevelmask = abs(byte(not (foldhiddenmask or currentfoldhiddenmask))); // line 891 Gives also a warning: msedatali

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread fredvs via fpc-pascal
And only changing this: > foldhiddenbit: byte = 7; Gives also a error message on next line unchanged: > foldhiddenmask = 1 shl foldhiddenbit; // raise a error on that line. Error: (3203) Illegal expression Fre;D - Many thanks ;-) -- Sent from: http://free-pascal-general.1045716.n5.nabbl

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread fredvs via fpc-pascal
Hello Alexander. I did: const foldhiddenbit : byte = 7; // line 896 foldhiddenmask : byte = 1 shl foldhiddenbit; // line 897 currentfoldhiddenbit : byte = 6; // line 898 currentfoldhiddenmask : byte = 1 shl currentfoldhiddenbit; // line 899 foldlevelmask : byte = not (foldhiddenmas

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread Alexander Grotewohl
: [fpc-pascal] Range check error warning. Hello WKitty. foldhiddenmask : byte = 1 shl foldhiddenbit; currentfoldhiddenmask : byte = 1 shl currentfoldhiddenbit; foldlevelmask : byte = not (foldhiddenmask or currentfoldhiddenmask); = msedatalist.pas(897,47) Error: (3203) Illegal

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread fredvs via fpc-pascal
Hello WKitty. foldhiddenmask : byte = 1 shl foldhiddenbit; currentfoldhiddenmask : byte = 1 shl currentfoldhiddenbit; foldlevelmask : byte = not (foldhiddenmask or currentfoldhiddenmask); = msedatalist.pas(897,47) Error: (3203) Illegal expression msedatalist.pas(899,61) Error: (32

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread Alexander Grotewohl
t.com From: fpc-pascal on behalf of wkitt...@windstream.net Sent: Tuesday, March 24, 2020 11:49:33 AM To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] Range check error warning. On 3/23/20 8:08 PM, fredvs via fpc-pascal wrote: > const > foldhi

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread wkitty42
On 3/23/20 8:08 PM, fredvs via fpc-pascal wrote: const foldhiddenbit = 7; foldhiddenmask = 1 shl foldhiddenbit; currentfoldhiddenbit = 6; currentfoldhiddenmask = 1 shl currentfoldhiddenbit; foldlevelmask = byte(not (foldhiddenmask or currentfoldhiddenmask)); >Here the warning I

[fpc-pascal] Range check error warning.

2020-03-23 Thread fredvs via fpc-pascal
Hello. With fpc 3.3.1 there is this warning: "Warning: (4110) Range check error while evaluating constants (-193 must be between 0 and 255)" Here the code pointed by the warning: const foldhiddenbit = 7; foldhiddenmask = 1 shl foldhiddenbit; currentfoldhiddenbit = 6; currentfoldhiddenmask =