Page 1 of 1

Pointer variable storage

Posted: Thu Mar 14, 2013 11:54 am
by UrgentKettle
Hello

Perhaps this is really a question for Fred, but maybe someone else knows: Is the pointer storage a signed or unsigned variable?

I have had some code that worked under Windows however when I ported to Linux I ran into a problem when checking for allocated memory by seeing if the value of *SomePointer was greater than 0. On Windows there was no problem but under Linux I got a negative value. Simply changing the check to Less Than or Greater Than Zero solved the problem, but it got me wondering...

This was with PB 5.00

Cheers

Re: Pointer variable storage

Posted: Thu Mar 14, 2013 11:59 am
by Fred
a pointer does not have a sign, you should never test it otherwise than <> 0.