Re: Silly operator precedence bug



Scout,

Consider these lines of code:


if not Column in [4..6] then
Column := 4;

My intention was that if the Column variable held either 9 or 2 before
this statement, it would end up containing 4 afterwards.

It didn't.

I can see why it didn't now.

I feel silly.

indeed. happened to me every time. wouldn't it be nice if you could write:

if Column not in [4..6] then

to avoid the whole thing?


--
marc hoffman

RemObjects Software
The Infrastructure Company
http://www.remobjects.com
.



Relevant Pages

  • ANN: RemObject Softwares ROadmap 2008 now online
    ... RemObjects Software is pleased to announce our new look ROadmap is now ... This has been updated to reflect our switch to three-monthly upgrades ... we note the intention of several other ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: VB 6.0 TO VB .NET - what was your experience?
    ... I saw I wrote "two programs", afterwards I saw that this example could be ... that was not my intention to you. ... information Tim did wanted to see. ... Cor ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Compromise on oral sex
    ... afterwards. ... Neither do we go to rest rooms with the intention of resting. ... And we chop trees down, only to go and chop them up ... Standards are forever flagging. ...
    (alt.usage.english)
  • Re: Compromise on oral sex
    ... afterwards. ... Neither do we go to rest rooms with the intention of resting. ... And we chop trees down, only to go and chop them up ...
    (alt.usage.english)
  • Re: Compromise on oral sex
    ... Neither do we go to rest rooms with the intention of resting. ... And we chop trees down, only to go and chop them up afterwards. ...
    (alt.usage.english)