Just a quick question, does exiting a loop with a goto command cause a memory leak in ICE like it does in Ti-BASIC? Thanks in advance!

Code:
Lbl A
While 1
Goto A
End
Nope.

ICE is compiled rather than interpreted, so it doesn't have to keep track of end statements at runtime the way BASIC does.
commandblockguy wrote:
Nope.

ICE is compiled rather than interpreted, so it doesn't have to keep track of end statements at runtime the way BASIC does.


Agreed.

It compiles into assembly similar to this:

Code:

 jr -2

Basically moves program execution back 2 bytes [the size of a 'jr' instruction] from the next instruction.
Which just indefinitely loops program execution there.
amazing that 4 lines of code compile to 1 instruction at this rare occasion
Correct me if I didn't do this right Mateo >;P
commandblockguy wrote:
Nope.

ICE is compiled rather than interpreted, so it doesn't have to keep track of end statements at runtime the way BASIC does.


That also means a nasty surprise if you miss an end statement: no RAM clear, it apparently just exits without closing the gfx...
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement