Free Web Hosting Provider - Web Hosting - E-commerce - High Speed Internet - Free Web Page
Search the Web

TI Source: Return
 
 Path: Home - Basic - Return    
  Basic    Assembly    Interactive    Miscellaneous    Members  

  Guide    Glossary    Programs  
 ReturnBy Justin 

Return is a very useful command when using subroutines. If you use Return in the subroutine, the program execution will go directly back to the calling program. Any loops will be ended.

If you do not put any Return in your subroutine, then the program will automatically return to the calling program.

Also you can use Return to quit your program and go back to the home screen.

Breakdown of code:

Lbl 1
Label this line "line 1".
ClrHome
Clear the home screen.
Disp "RETURN?"
Display "RETURN?" on the home screen.
Input Str1
Input text into the variable string variable Str1.
If Str1="Y"
Test to see if the string variable Str1=Y.
Return
If Str1 does equal "Y", then return to the home screen.
Goto 1
If Str1 does not equal "Y", then the program will continue execution to this line. This line tells it to go to the line labeled "1". So the program will just loop to the beginning.

Program output:

 Downloads:
TitleDescriptionAuthor
return.zipReturn to the home screen.Justin

  Basic    Assembly    Interactive    Miscellaneous    Members