[Gambas-user] Issue 94 in gambas: A For-statement can store an Integer in a Byte/Short.
gambas at ...2524...
gambas at ...2524...
Wed Aug 31 20:57:12 CEST 2011
Status: New
Owner: ----
Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any
Desktop-Any GUI-Any
New issue 94 by emil.len... at ...626...: A For-statement can store an Integer
in a Byte/Short.
http://code.google.com/p/gambas/issues/detail?id=94
1) Describe the problem.
Like the summary, a for-statement can store an Integer in a Byte/Short.
It should wrap, but it doesn't. See the example.
2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate):
Version: TRUNK
Revision: r4067
Operating system: Linux
Architecture: x86_64
3) Provide a little project that reproduces the bug or the crash.
The code:
Dim i As Byte
For i = 1 To 255
Next
Print i
Prints 256, when it should print 0. (Print i+0 actually prints 0).
The same happens with Short.
4) If your project needs a database, try to provide it, or part of it.
5) Explain clearly how to reproduce the bug or the crash.
Run the example.
6) By doing that carefully, you have done 50% of the bug fix job!
More information about the User
mailing list