Weekly Qbasic and Qb64 Lesson Topics
March 29, 2024, 09:41:58 am
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Want to see a specific Tutorial? ASK!
 
  Home Help Search Arcade Links Staff List Login Register  

Goto's and loops dont mix will if done improperly

Pages: [1]
  Print  
Author Topic: Goto's and loops dont mix will if done improperly  (Read 823 times)
GarrisonRicketson
Admin
Administrator
Hero Member
*****
Posts: 583



WWW
« on: March 28, 2011, 09:54:35 pm »

I would need to go over this a few times, to get it all, but this:
Quote
So if you exit that loop with a GOTO, that information stays in the stack,
if you do that long enough the stack will eventualy fill up and crash your
program or do something unexpectedly because the GOTO statment does not clear the stack of that info. The stack will eventualy fill up and crash your program if done enough times.

The EXIT statement will clear the stack properly
brings to mind, and probably explains, why some previous (firsts), experiments, I can't really call them programs, as that was the problem, they worked, at first, but later start messing up each time I try to run it again,...
 Thanks for bringing this up Dusty, that is a important aspect, rather the saying never use GOTO, learn, or explain, when not to, and when it is appropriate,...
thanks from Garry
Report Spam   Logged


Pages: [1]
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum


Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy