[Gambas-user] Issue 420 in gambas: Error not raised in nested for..next loop

gambas at ...2524... gambas at ...2524...
Thu Apr 11 13:25:34 CEST 2013


Status: New
Owner: ----
Labels: Version-TRUNK Type-Bug Priority-Medium OpSys-Linux Dist-Any  
Arch-Any Desktop-Any GUI-Any

New issue 420 by ea7... at ...626...: Error not raised in nested for..next loop
http://code.google.com/p/gambas/issues/detail?id=420

In a nested 'For' loop, when the iterator in the inner loop is not present,  
doesn't raise any error or warning. Consider this example:

Private values As Integer[] = [1, 2, 3, 4, 5, 6, 7, 8, 9]

Public Sub main()
     Dim n, x, y As Integer
     n = 0
     For x = 0 To values.Max
         For = n To values.Max ' note there's not a variable after For.
             Print values[x]; values[y]
         Next
         n += 1
     Next
End

Program runs normally, though the results are not as expected. Instead, an  
error might be raised.

Version: TRUNK
Revision: 5608

[System]
OperatingSystem=Linux
Kernel=3.2.0-23-generic
Architecture=x86_64
Distribution=Linux Mint 13 Maya
Desktop=GNOME
Theme=QPlastique
Language=es_ES.UTF-8
Memory=16034M

[Libraries]
Curl=libcurl.so.4.2.0
GStreamer=libgstreamer-0.10.so.0.30.0
GTK+=libgtk-x11-2.0.so.0.2400.10
Qt4=libQtCore.so.4.8.1
SDL=libSDL-1.2.so.0.11.3
Poppler=libpoppler.so.19.0.0


-- 
You received this message because this project is configured to send all  
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings




More information about the User mailing list