On Nov 4, 2005, at 18:24, Joshua Isom wrote:

[ please top-post ]

But why should the result be an unportable/undocumented parrot op? If parrot's aiming for portability, so long as external libraries aren't used, shouldn't parrot treat code the same way for all platforms? Otherwise, each compiler for parrot would have to add in code to find out the size of int, and handle it to provide an expected result. Wouldn't that just be too much duplication of code?

Well I see several issues with a portable solution:
- x >> 32 (or more) on a 64 bit platform is meaningful, what to do on a 32 bit platform
- what is it then good for anyway, this isn't platform independant
- why do you need it
- speed: you need an extra test for a valid shift count

An finally:
$ perl -le 'print 24 >>32'   # ppc
0
$ perl -le 'print 24 >>32'   # x86
24
$ perl -le 'print 24 >>32'  # amd64
0

leo

Reply via email to