Can anyone explain why this expression:
(aNumber >= anotherNumber) and: [aBoolean] is perfectly fine, but its permutation: aBoolean and: [aNumber >= anotherNumber] throws a VM-generated error? I banged my head hard, but can't find out. Must be too thick. S. __________________________________________________ Stefano Franchi Department of Philosophy Ph: (64) 9 373-7599 x83940 University Of Auckland Fax: (64) 9 373-7408 Private Bag 92019 [hidden email] Auckland New Zealand |
Stefano Franchi escreveu:
> Can anyone explain why this expression: > > (aNumber >= anotherNumber) and: [aBoolean] > > is perfectly fine, but its permutation: > > aBoolean and: [aNumber >= anotherNumber] > > throws a VM-generated error? > > I banged my head hard, but can't find out. Must be too thick. > The permutations above work perfectly in a Workspace in VW7.3.1nc and VW7.4nc. -- Cesar Rabak GNU/Linux User 52247. Get counted: http://counter.li.org/ |
In reply to this post by stefano-franchi
> Can anyone explain why this expression:
> > (aNumber >= anotherNumber) and: [aBoolean] > > is perfectly fine, but its permutation: > > aBoolean and: [aNumber >= anotherNumber] > > throws a VM-generated error? > > I banged my head hard, but can't find out. Must be too thick. What's the error? Does it happen at compile-time or execution-time? One thought: If aBoolean is not an instance of Boolean the first expression will execute without error, but the second expression will throw "NonBoolean receiver". Is that what you're seeing? -Carl Gundel, author of Liberty BASIC http://www.libertybasic.com |
In reply to this post by stefano-franchi
I tried, and could not reproduce your problem. Can you give a specific
example that fails? At 08:50 AM 5/7/2006, you wrote: >Can anyone explain why this expression: > >(aNumber >= anotherNumber) and: [aBoolean] > >is perfectly fine, but its permutation: > > aBoolean and: [aNumber >= anotherNumber] > >throws a VM-generated error? > >I banged my head hard, but can't find out. Must be too thick. > >S. > > > > >__________________________________________________ >Stefano Franchi >Department of Philosophy Ph: (64) 9 373-7599 x83940 >University Of Auckland Fax: (64) 9 373-7408 >Private Bag 92019 [hidden email] >Auckland >New Zealand <Talk Small and Carry a Big Class Library> James Robertson, Product Manager, Cincom Smalltalk http://www.cincomsmalltalk.com/blog/blogView |
On May 12, 2006, at 2:27 AM, James Robertson wrote: > I tried, and could not reproduce your problem. Can you give a > specific example that fails? > > At 08:50 AM 5/7/2006, you wrote: >> Can anyone explain why this expression: >> >> (aNumber >= anotherNumber) and: [aBoolean] >> >> is perfectly fine, but its permutation: >> >> aBoolean and: [aNumber >= anotherNumber] >> >> throws a VM-generated error? >> >> I banged my head hard, but can't find out. Must be too thick. >> >> S. >> >> >> >> >> __________________________________________________ >> Stefano Franchi >> Department of Philosophy Ph: (64) 9 373-7599 x83940 >> University Of Auckland Fax: (64) 9 373-7408 >> Private Bag 92019 >> [hidden email] >> Auckland >> New Zealand > > <Talk Small and Carry a Big Class Library> > James Robertson, Product Manager, Cincom Smalltalk > http://www.cincomsmalltalk.com/blog/blogView > > Stefano Franchi Department of Philosophy Ph: (64) 9 373-7599 x83940 University Of Auckland Fax: (64) 9 373-8768 Private Bag 92019 [hidden email] Auckland New Zealand |
In reply to this post by James Robertson-3
Hi James,
it was actually an embarrassing mistake of mine: I didn't realize I had initialized aBoolean to True instead of true (i.e class instead of instance). Then of course I would not get the error when aBoolean was inside the block because it was never evaluated. As I said, embarrassing... Cheers, Stefano On May 12, 2006, at 2:27 AM, James Robertson wrote: > I tried, and could not reproduce your problem. Can you give a > specific example that fails? > > At 08:50 AM 5/7/2006, you wrote: >> Can anyone explain why this expression: >> >> (aNumber >= anotherNumber) and: [aBoolean] >> >> is perfectly fine, but its permutation: >> >> aBoolean and: [aNumber >= anotherNumber] >> >> throws a VM-generated error? >> >> I banged my head hard, but can't find out. Must be too thick. >> >> S. >> >> >> >> >> __________________________________________________ >> Stefano Franchi >> Department of Philosophy Ph: (64) 9 373-7599 x83940 >> University Of Auckland Fax: (64) 9 373-7408 >> Private Bag 92019 >> [hidden email] >> Auckland >> New Zealand > > <Talk Small and Carry a Big Class Library> > James Robertson, Product Manager, Cincom Smalltalk > http://www.cincomsmalltalk.com/blog/blogView > > Stefano Franchi Department of Philosophy Ph: (64) 9 373-7599 x83940 University Of Auckland Fax: (64) 9 373-8768 Private Bag 92019 [hidden email] Auckland New Zealand |
Free forum by Nabble | Edit this page |