Page 2 of 2

Re: Search with "Whole words only" option should omit @

Posted: Wed May 21, 2014 3:46 pm
by Tenaja
TI-994A wrote:Operators and address references never form any part of an identifier.
Your statement contradicts the manual, on this page:
http://www.purebasic.com/documentation/ ... emory.html
Note: unlike C/C++, in PureBasic the '*' is always part of the item name. Therefore '*ptr' and 'ptr' are two different variables. 'ptr' is a variable (regular one) storing a value, '*ptr' is another variable of pointer type storing an address.
This is why the asterisk MUST be part of a "whole word" (if you want the IDE to be technically correct). OTOH, it makes no sense for an ampersand to be included in the list, unless you are more concerned with email addresses.

edit:
IMHO, using both '*ptr' and 'ptr' should not be allowed. PB does so many things to protect beginners, it would make sense to add this rule.

Re: Search with "Whole words only" option should omit @

Posted: Wed May 21, 2014 8:16 pm
by TI-994A
Tenaja wrote:
TI-994A wrote:Operators and address references never form any part of an identifier.
Your statement contradicts the manual...
...the '*' is always part of the item name. Therefore '*ptr' and 'ptr' are two different variables...
Hi Tenaja. Clearly, you've misunderstood the statement. There's no mention of pointers; only operators and address references. :lol:

Re: Search with "Whole words only" option should omit @

Posted: Thu May 22, 2014 2:22 pm
by Tenaja
You are right, I did. I was reading your address reference as address dereference. Terribly sorry.