Manufacturing Information Solutions Forum Index Manufacturing Information Solutions
Your Place for Support and Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How To Initialize a Range of Variables

 
Post new topic   Reply to topic    Manufacturing Information Solutions Forum Index -> G-Code Programming
View previous topic :: View next topic  
Author Message
franke
Master Poster


Joined: 26 Jun 2004
Posts: 161
Location: Indiana, USA

PostPosted: Fri Jul 02, 2004 11:52 am    Post subject: How To Initialize a Range of Variables Reply with quote

It's good programming practice to initialize the variables that you are going to use. This loop will set common variables 100-149 to VACANT. Change #1=100 to a new starting variable if you want to clear a different range.

Use this simple code to clear a range of variables before using them to guarantee that you start with Vacant values!

Code:
#1=100
WHILE[#1LE149]DO1
#[#1]=#0
#1=#1+1
END1


Enjoy! Laughing
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Manufacturing Information Solutions Forum Index -> G-Code Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group