Function parsing problem? Topic is solved

Report problems with documented functionality
coffee
Posts: 133
Joined: 01 Apr 2017, 07:55

Function parsing problem?

29 Jun 2017, 16:55

Not sure if this is a bug or some obscure intended exception. I can't see in the documentation that the word "time" is reserved as variable name.
This is on v2.080, v2.078 also has this problem, but not v1.1.26

This is just a sample, it may not make mathematical sense due to operator precedence, but it's still wrong that it doesnt work.

Code: Select all

sometime:=10
somevar:=5
finish:=sometime+(somevar*10000)
msgbox(finish)
The code above throws an exception with message "Call to nonexistent function" and references line "finish:=sometime+(somevar*10000)"
Now, this only happens under the criteria that the variable name is either "time" or ends with the word "time", it can be preceded by anything, but as long as it ends in time it will trigger this, and, It also needs to be lacking a space either between the variable name ending in time and the + sign, or, the + sign and the (. It doesn't like + or - sign in that expression, but it works fine with * or /, if the variable name is for example, timex, then it works.


Well, I tested a bit more as I wrote this and it seems to be a problem with the parser in that it is not ignoring + and - sign when looking for functions. Basically, if you try variable+(whatever), and variable's name is or ends with the ending word of a function (command as function too, but not all of them), it will throw the exception.
For example, close+(somevar), size+(somevar), sense+(somevar), replace+(somevar) all throw the exception.
just me
Posts: 9456
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: Function parsing problem?

30 Jun 2017, 01:30

Bug confirmed!

Edit:
In addition to readability it seems to be more safe not to omit these 'non-required' spaces/tabs and concat operators:

Code: Select all

sometime := 10
somevar := 5
finish := sometime + (somevar * 10000)
msgbox(finish)
lexikos
Posts: 9589
Joined: 30 Sep 2013, 04:07
Contact:

Re: Function parsing problem?

30 Jun 2017, 03:06

The bug relates to the joining of two apparent "words" into a single number with scientific notation, such as 1.0e+5 (note the e followed by plus sign). Plus and minus are affected.
lexikos
Posts: 9589
Joined: 30 Sep 2013, 04:07
Contact:

Re: Function parsing problem?  Topic is solved

15 Jul 2017, 21:10

Fixed in v2.0-a081-cad307c.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 12 guests