Editing
Variables
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
The FOR NEXT loop is a way of making a certain action occur a set number of times. Sometimes it is necessary to change something each time the action is performed. One way of doing this is to use a ''variable''. A variable is a word which can be given a numerical value. Try this example. From the Smart Move main screen type LET cars = 23 < Enter >, then type PRINT cars < Enter >. The current value of cars (i.e. 23) will be printed. The example shown in fig. 4 uses a variable to switch on and off each output in turn. Type BUILD FlashThemAll < Enter > and type in the lines shown in fig. 4. Then press the < Esc > key to display the main screen. Type FlashThemAll < Enter > to run it. [[File:Tutorial-fig04.png|frame|none|fig. 4]] ''How it works.'' As you can see variables are an important feature of Smart Move. Your variables can be up to 15 characters in length. The command VALUES will list all the variables you have created and their current value. [[Category:Tutorial]]
Summary:
Please note that all contributions to Smart Box may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Smart Box:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
British English
Views
Read
Edit
View history
More
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information