Page 2 of 2
Posted: Mon Mar 19, 2007 4:28 pm
by Psychophanta
you can not apply Len() to a 32bit integer, but to a PB string.
So then it should and would return an error:
See yourself
And by the way, is it so difficult to see?

Posted: Mon Mar 19, 2007 6:59 pm
by GedB
Psychophanta,
The whole idea of a pointer is that you can treat it as the variable type it is pointing to.
If you want a 32bit integer, then use a long.
What, exactly, are you trying to achieve?
Posted: Tue Mar 20, 2007 6:31 pm
by Xombie
Psychophanta,
A mose is a mose, a rose is a rose and a nose is a nose as a fairly famous song went. A pointer simply points to a 32 bit address in memory. The variable in that 32 bit address can be whatever it needs to be. So while for readability it might be nice to say *HoldPoint.s = @"Test", you're trying to assign a 32 bit address (long) variable to a string which breaks some rules. What if you need to point to *HoldPoint ? Do you use *MorePoint.l = @*HoldPoint ? Or is it again *MorePoint.s = @*HoldPoint?
Rather, wouldn't it be easier to name your variable something to let you know what's being pointed to? *HoldString.l = @"Test" is much more readable to me and I don't have to worry about the ".s"
Which brings me to another point (ha ha). Do you always type the ".s" when using that variable in your code? If not, don't you lose the readability? And if you do, doesn't it become too troublesome after a while? Whereas if you always use something like *HoldString you know it's a pointer by the "*" and you know it's a string by the variable name. Or simply comment your code more so you never forget.
It doesn't seem to do very well to confuse the issue by saying a ".b" is a byte variable declaraction but could also be used in declaring a 32 bit address pointer to a byte variable.
That's just my thinking and it's quite possible that I'm missing the point.
Re: [Implemented] Suggestion to avoid a PB incoherence
Posted: Tue Feb 19, 2013 5:29 pm
by Psychophanta
Fixed! Xombie,
The rose (pointer variables) and the mose (no pointer variables) are all the samething: VARIABLES
