[Gambas-user] R: Unending cycle "For...Next" with variable As Byte

Jussi Lahtinen jussi.lahtinen at ...626...
Sun Sep 30 17:40:52 CEST 2012


It is not bug, Richard is right.

Jussi



On Sun, Sep 30, 2012 at 6:32 PM, Tobias Boege <taboege at ...626...> wrote:

> On Sun, 30 Sep 2012, Ru Vuott wrote:
> > ...I have:
> >
> > [Gambas 3]
> > Version=3.3.0
> >
> >
> >
> >
> >
> > --- Dom 30/9/12, Ru Vuott <vuott at ...325...> ha scritto:
> >
> > > Da: Ru Vuott <vuott at ...325...>
> > > Oggetto: [Gambas-user] Unending cycle "For...Next" with variable As
> Byte
> > > A: gambas-user at lists.sourceforge.net
> > > Data: Domenica 30 settembre 2012, 16:57
> > > Hello,
> > >
> > > maybe I'm in the clouds.... but I don't understand why this
> > > cycle:
> > >
> > > **********
> > > Public Sub Button1_Click()
> > >
> > > ? Dim j As Byte
> > >
> > > ? For j = 0 To 255
> > >
> > > ???Print j
> > >
> > > ? Next
> > >
> > > End
> > > **********
> > >
> > > runs "ad infinitum" !
> > >
> > > Regards
> > > vuott
> > >
>
> Can confirm that with rev5189. Richard's guess sounds logical. "For To" is
> inclusive: [0; 255] and that's everything you can represent with Byte
> width.
> You won't ever detect Byte > 255.
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://ad.doubleclick.net/clk;258768047;13503038;j?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list