Modify ↓
Opened 10 years ago
Closed 5 years ago
#3232 closed Bug (Fixed)
Issue when parsing scientific notation literals
| Reported by: | jchd18 | Owned by: | Jon |
|---|---|---|---|
| Milestone: | 3.3.15.4 | Component: | AutoIt |
| Version: | 3.3.14.0 | Severity: | None |
| Keywords: | Cc: |
Description (last modified by )
The runtime parser sometimes fails on reals in scientific notation immediately followed by some operators or silently gives a wrong result in some cases.
$x = 1e2 + 10 ConsoleWrite($x & @CRLF) ; 110 OK $x = (1e2)+10 ConsoleWrite($x & @CRLF) ; 110 OK $x = 1e2+10 ConsoleWrite($x & @CRLF) ; 100 Wrong! $x = 1e2-10 ConsoleWrite($x & @CRLF) ; 100 Wrong! $x = 1e2^10 ConsoleWrite($x & @CRLF) ; 1e+020 Wrong! $x = 1e2+ 10 ; Unable to parse line. ConsoleWrite($x & @CRLF) $x = 1e2- 10 ; Unable to parse line. ConsoleWrite($x & @CRLF) $x = 1e2^ 10 ; 1e+020 Wrong! ConsoleWrite($x & @CRLF)
+, - and ̂ are the only arithmetic operators affected: * and / seem to work correctly. (It was fun composing the exponentiation sign here!)
Attachments (0)
Change History (8)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
That's obvious, since tidying the code inserts whitespace between literals and operators, when needed, for readability. The bug remains that untidied code isn't parsed correctly or gives wrong results.
comment:3 by , 10 years ago
| Description: | modified (diff) |
|---|
comment:4 by , 8 years ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:7 by , 6 years ago
| Owner: | changed from to |
|---|
comment:8 by , 5 years ago
| Milestone: | → 3.3.15.4 |
|---|---|
| Owner: | changed from to |
| Resolution: | → Fixed |
| Status: | assigned → closed |
Fixed by revision [12547] in version: 3.3.15.4
Note:
See TracTickets
for help on using tickets.

If I run Tidy on those lines, I get the correct results.