Thank you, nando, for your contribution.




--- Mar 2/10/12, nando <nand...@nothingsimple.com> ha scritto:

> Da: nando <nand...@nothingsimple.com>
> Oggetto: Re: [Gambas-user] Unending cycle "For...Next" with variable As Byte
> A: "mailing list for gambas users" <gambas-user@lists.sourceforge.net>
> Data: Martedì 2 ottobre 2012, 07:38
> When using Byte data type
> 
> The loop iteration when j=255 is 255 + 1 = 0
> 
> Thus, the end condition of j>255 can never happen
> It is an endless loop.
> This 'problem' is correct operation for the datatype used.
> This issue arises always at the boundary of the datatype
> when math takes it beyond the possible range.
> 
> 
> ---------- Original Message -----------
> From: Ru Vuott <vu...@yahoo.it>
> To: gambas-user@lists.sourceforge.net
> Sent: Sun, 30 Sep 2012 15:57:56 +0100 (BST)
> Subject: [Gambas-user] Unending cycle "For...Next" with
> variable As Byte
> 
> > 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
> > 
> >
> ------------------------------------------------------------------------------
> > 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@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> ------- End of Original Message -------
> 
> 
> ------------------------------------------------------------------------------
> Don't let slow site performance ruin your business. Deploy
> New Relic APM
> Deploy New Relic app performance management and know
> exactly
> what is happening inside your Ruby, Python, PHP, Java, and
> .NET app
> Try New Relic at no cost today and get our sweet Data Nerd
> shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to