In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote: Jon, It prevents subroutines from trying to use the same global variable. From having to declare uumpteen temp global variables. It makes subroutine more modular. They can stand alone without depending on certain variable names to be declared. Subroutines can use the same variable names without any problem. If sub1 has a local var named "temp" and it calls sub2 that has a local var named "temp" it will still work just fine. It saves RAM because all the variables for all the subroutines are not declared at the same time. In essence they are created "on-the-fly" at runtime. If SX/B had not been geared towards learning assembly, I would made ALL variable work like array elements (through FSR). Then every variable type would work the same way. But the code would be alot larger and not nearly as easy to understand. Bean. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=199207#m199362 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)