Bug #399
closedGosub and Goto using variable fails (integer or string)
0%
Description
Gosub using variable fails. (related to bug #28)
The result is a syntax error.
#manifest: "pc"
#splashScreen: false
#speed: "safe"
#fps: false
X=20
Gosub X
End
20 Print "line 20"
Return
This also fails when using labels:
#manifest: "pc"
#splashScreen: false
#speed: "safe"
#fps: false
X=20
X$="MyLabel"
Gosub X$
End
MyLabel:
Print "My Label"
Return
NOTE: In both cases, you can work around this bug by putting the expression within parentheses, but this should NOT be required. Any valid expression should be allowed.
NOTE2: This was also a bug in AMOOS Pro (for numerics). String expressions weren't a problem in AMOS Pro (but they are in AOZ!).
Here's the syntax description from the manual... as it should be:
GOSUB
structure: jump to a sub-routine
Gosub label
Gosub number
Gosub expression
NOTE that there are NO parentheses in the syntax!
NOTE also that string labels are NOT case-sensitive!
Updated by Brian Flanagan over 4 years ago
- Affected version changed from 0.9.9.2 to 0.9.9.3
Corrected affected version.
Updated by Brian Flanagan about 4 years ago
- Estimated time set to 2:00 h
- Affected version changed from 0.9.9.3 to Beta RC2
Re-tested in Beta RC2. Both examples still fail.
Updated by Francois Lionet about 4 years ago
- Status changed from New to Resolved
- Assignee set to Francois Lionet
- Target version set to Beta RC4
Fixed!
Updated by Brian Flanagan about 4 years ago
- Status changed from Resolved to Closed
Works with 9 Oct updates!