Hi Rob, That option will set bRtn to 1 from starting of the count of nTimeOut. I need to bRtn to be set only depending on what happens inside while-loop... Check my second post for the complete while-loop code in use. Thanks anyways.
Cheers, FS On Monday, January 2, 2023 at 8:41:45 AM UTC [email protected] wrote: > Hi Filipe, > > If you do not want to change bRtn why not change it to: > > if nTimeOut >= nTimeOutMax then > exit loop > else > bRtn = 1 > end if > -- > Kind regards, > > Rob > > ------------------------------ > *Van:* [email protected] <[email protected]> namens flyway38 < > [email protected]> > *Verzonden:* zondag 1 januari 2023 21:39 > *Aan:* jallib <[email protected]> > *Onderwerp:* Re: [jallib] Exit Loop issue > > Hi Rob, > > Happy New Year !! > > Two Loops ?? > Not sure if theres two loops here... > Check my code with more details, please. > > while !fReturn loop > print_string(serial_hw_data,"Waiting for SIM to be Ready...") > print_crlf(serial_hw_data) > FlushRCVD > delay_1ms(1_000) > fReturn = CheckComms_SIMready() > -- > nTimeOut = nTimeOut +1 > if nTimeOut >= nTimeOutMax then > exit loop > end if > -- > bRtn = 1 > end loop > > I need to exit this While Loop if nTimeOut >= nTimeOutMax without setting > bRtn = 1... > Thank for your help. > > Cheers, > FS > > > On Sunday, January 1, 2023 at 7:00:31 PM UTC [email protected] wrote: > > Hi Filipe, > > Happy New Year! > > If I am right the exit loop will only exit the current loop. I see you are > using two loops so it does not exit the second one. > > Kind regards, > > Rob > > ------------------------------ > *Van:* [email protected] <[email protected]> namens flyway38 < > [email protected]> > *Verzonden:* zondag 1 januari 2023 19:36 > *Aan:* jallib <[email protected]> > *Onderwerp:* [jallib] Exit Loop issue > > Hello to all, > > Maybe something I don't understand, but here's my issue: > > ... > if nTimeOut >= nTimeOutMax then > exit loop > end if > > bRtn = 1 > end loop > > This code still runs bRtn = 1 when nTimeOut is >= nTimeOutMax. > Think it shouldn't do that, right? > Thank you. > > Regards, > Filipe Santos > > -- > You received this message because you are subscribed to the Google Groups > "jallib" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jallib/8b148810-86d8-49a7-9757-a8c21e391835n%40googlegroups.com > > <https://groups.google.com/d/msgid/jallib/8b148810-86d8-49a7-9757-a8c21e391835n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > -- > You received this message because you are subscribed to the Google Groups > "jallib" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jallib/54c1a9aa-2b69-4a09-b338-6ef31c685297n%40googlegroups.com > > <https://groups.google.com/d/msgid/jallib/54c1a9aa-2b69-4a09-b338-6ef31c685297n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/2e81be2d-003f-418b-bea8-7f948aafab15n%40googlegroups.com.
