& what is wrong here?

BlitzMax Forums/BlitzMax Programming/& what is wrong here?

RGR(Posted 2006) [#1]
.

Last edited 2012


H&K(Posted 2006) [#2]
What do you expect the output to be?
16777216
33554432
50331648
67108864
83886080
100663296
117440512
134217728
150994944
167772160
184549376
201326592
Why is this wrong. The first time i&111111111111111111111111 is 0 is when i =1000000000000000000000000

Edit Oh stupid me point seen, I should have let it run first time
veri:Long=16777215:Long
fs2:Long=5000000000:Long
For i:Long=1 To fs2
  If (i & veri) = 0
    Print i
  EndIf
Next
Print
Print i
End

5000000000 isnt a long (it is truncated to the default Int). 5000000000:long is a long
(Which could be counted as a bug)


FlameDuck(Posted 2006) [#3]
Filesizes of DVD.iso are wrong if they are bigger as 2^31 ?
Filesize() doesn't return a Long.


RGR(Posted 2006) [#4]
.

Last edited 2012


marksibly(Posted 2006) [#5]
Max uses the C standard library for file IO, which itself uses ints.

We will not be implementing 'long' file ops in the foreseeable future, although you could always look at using native windows routines yourself.