Search with "Whole words only" option should omit @

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

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

Post 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.
User avatar
TI-994A
Addict
Addict
Posts: 2705
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

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

Post 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:
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

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

Post by Tenaja »

You are right, I did. I was reading your address reference as address dereference. Terribly sorry.
Post Reply