|
|
|||||||
Dear Ruud et. al., I've found a line error bug relating to invalid UDF calls. Please check out the following code: Code: ? "Line 1" ? "Line 2" Test Function Test($x) $Test=$x EndFunction Which returns: Code: Line 1 Line 2 ERROR : invalid method/function call: missing '('! Script: C:\Temp\test.kix Line : 10 There are only 9 lines of code in the above script. I assume that KiX is scanning the entire script for a function with the same name and signature. When it gets to the end, it returns the number of lines of the script + 1 as the error line rather than where the error occured. Regards, Richard |
||||||||
|
|
|||||||
Is this an error? V4.53, 4.52, 4.50 give the same messages. |
||||||||
|
|
|||||||
Just because older versions also exhibit the same behaviour doesn't preclude it from being an error. It just means that no one has found and reported it before. |
||||||||
|
|
|||||||
Are you the QA dept looking for obscure minor things to complain about? |
||||||||
|
|
|||||||
Hardly. I don't think reporting a bug is complaining at all. I don't care too much if this gets fixed, however I certainly hate any bugs in my code and as a courtesy to Ruud, I'm letting him know about. It is up to him if he wants to do something about it. |
||||||||
|
|
|||||||
Les - A bug doesn't really have a size - and if it has - it's small, right? If it's big you usually call it beta or release candidate, no? Meds - Agree, it catches the missing (), but throws you of at line that is a bug in my opinion. |
||||||||
|
|
|||||||
hmm... this has actually been reported earlier and ruud even answered something but yeah, it never got fixed. the error messages have had issues as far as I can remember. The issues have changed a lot during the years, but they have never been totally accurate. also, one might consider the depth of the information of the error being way too shallow. say, someone writes a line with some 20 function calls from which half of them are nested. How he may know from the error where the problem lies? |
||||||||
|
|
|||||||
How about doing it the same way a regular error shows - say, if you set the option that you have to declare variables - it halts on the first error period ? Using the same logic here seems to me to be the easiest way, or? Perhaps that doesn't touch that kind of nested code? |
||||||||
|
|
|||||||
Originally Posted By: Björn Les - A bug doesn't really have a size - and if it has - it's small, right? I tend to get a little defensive when people start crying "BUG" for every little "feature". |
||||||||
|
|
|||||||
Originally Posted By: Les Actually, I would not call it a bug. IMHO a bug causes good code to go bad. A properly written script would never manifest this issue. Well - The code for getting the proper line goes bad in my opinion. Feature is what I would call it if it was left there with intent - perhaps it was. Yes, I get you Les - no worries, you know I'll ask if I don't |
||||||||
|
|
|||||||
Your confusing issues here. It is a bug in the KiXtart run-time, it just takes a script bug to show it. It is of course a minor bug, and if I was Ruud, I wouldn't necessarily bother to fix it if it wasn't easy to do so. I would much rather he used his precious time to add things like: .NET support; COM events; multi-threading; references; nested error handling; inbuilt associative arrays; etc... |
||||||||
|
|
|||||||
nice list of feats dude. maybe not in the perfect order. but threads, com events and refs would be way cool. anyhow... this minor thing is a annoying one and it increases the learning curve of a fresh scripter and that's bad. Giving misleading information where the actual error is can sometimes be really exhausting. |