Post Reply 
Easy Bugs
10-15-2014, 05:41 AM (This post was last modified: 10-15-2014 05:52 AM by Tim Wessman.)
Post: #2
RE: Easy Bugs
This one is one of those deceptively simple ones.

Right now, it is a very simple checker and I agree it could use some more work. The problem really comes down to that the user's intentions are not clear in many cases when you are trying to match text mixed in with math. Is it matching forward/backwards in priority? Do you go backwards first? If so, how far. What if you go backwards until the first match (like in this case) but there is another better match? How about this case (cursor is at the |)?

2acos2asin(|tan)

Do you step backwards to asin and be done? Should you go back 4 and match, but then continue to go back more and find acos2asin? Why not move forward to tan and match that? It is closer and fewer characters away so why wouldn't tan be the correct one? Or should that whole thing be parsed as 2*acos(2)*asin(tan... ???

Right now, the logic is basically go backwards skipping over ( until it finds a match or hits an invalid name character. If it didn't find anything, move forward to see if there is another match in front of the cursor.

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Easy Bugs - PANAMATIK - 10-15-2014, 05:10 AM
RE: Easy Bugs - Tim Wessman - 10-15-2014 05:41 AM
RE: Easy Bugs - Claudio L. - 10-15-2014, 03:59 PM
RE: Easy Bugs - PANAMATIK - 10-15-2014, 09:53 PM
RE: Easy Bugs - Eddie W. Shore - 10-23-2014, 01:39 PM
RE: Easy Bugs - PANAMATIK - 10-20-2014, 03:08 AM
RE: Easy Bugs - Wolfgang - 10-31-2014, 05:09 PM
RE: Easy Bugs - toml_12953 - 10-31-2014, 05:39 PM
RE: Easy Bugs - Marcus von Cube - 10-31-2014, 08:17 PM
RE: Easy Bugs - Wolfgang - 11-01-2014, 04:56 AM



User(s) browsing this thread: 1 Guest(s)