Login   Register  
PHP Classes
elePHPant
Icontem

parser issues

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Array and Object Handling  >  All threads  >  parser issues  >  (Un) Subscribe thread alerts  
Subject:parser issues
Summary:there are two bugs in the class
Messages:4
Author:Ghica van Emde Boas
Date:2006-05-18 09:28:09
Update:2006-05-18 15:41:03
 

  1. parser issues   Reply  
Picture of Ghica van Emde Boas
Ghica van Emde Boas
2006-05-18 09:28:09
Hi!
I downloaded your class and I found that my PHPEclipse parser has two issues with it:

1. Bad style: don't use keyword "array" as an identifier.
I fully agree.

2. line 234: echo("Array::interval: Interval is too large",0);
Parser error: ')' expected in expression.
The parser is right of course, but what is the intention of your code?

One other thing:
line 80: $array_var may not have been initialized. Actually, when looking at the code, I think you meant $array instead, so it is a third bug.

  2. Re: parser issues   Reply  
Picture of Shoeb
Shoeb
2006-05-18 12:38:48 - In reply to message 1 from Ghica van Emde Boas
Hi,

Okay i have fixed the second and the third. But for the first i never got this error. Let me know if you could resolve it!

Regards,
Accilies.

  3. Re: parser issues   Reply  
Picture of Ghica van Emde Boas
Ghica van Emde Boas
2006-05-18 12:55:25 - In reply to message 2 from Shoeb
Hi,
You can only fix this by choosing a better name for your class, something else as Array, for example MyArray, or AArray, or ArrayFunctions, whatever, as long as it is not a reserved word.

My parser gives hints about bad programming style, it is not a real bug. My concern is that it could make you look as a not-so-good-programmer, which would be a pity because I think your class is useful.

  4. Re: parser issues   Reply  
Picture of Shoeb
Shoeb
2006-05-18 15:41:03 - In reply to message 3 from Ghica van Emde Boas
Hello,

Thanks for appriciating the class and pointing the programing flaw. I have remaned the class to MasterArray.

I have one more question. I am new to this posting of classes so far when posting my class i generally chose GPL as the licence is that okay ? or can you suggest me what licence should i use. My aim is simple. Use my classes as much as you can and modify it as per your requirement but dont call it yours as i have written it. The classes are presented without quranty although if someone posts a bug I will try to resolve it ASAP.

Hope to hear from you soon.

Take care.