Why does this happen

by Ben (no login)

 


C:\QB45>qb /run test.bas
9446
0

C:\QB45>bc test.bas/O/T/C:512;
...

C:\QB45>test.exe
464
36

test.bas:
DIM m(10000) AS LONG
PRINT HEX$(VARSEG(m(0)))
PRINT HEX$(VARPTR(m(0)))
SYSTEM


It was said when pointing to first in array, VARPTR(array(0)) is always going to be 0. But when compiled, it turns out it's not 0. Why does this happen, why was it said that VARPTR(array(0)) is always 0, and is it possible to fix it so array aligned in segment.


Posted on Jan 1, 2010, 10:53 AM

Respond to this message   

Return to Index

Response TitleAuthor and Date
Try making it a Stand-alone exe file, instead of the one that requires BRUN45. on Jan 1
Re: Why does this happenLaanan Fisher on Jan 2

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement