newbee question
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
newbee question

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
G
Guest





Posted: Sun Oct 02, 2005 12:10 am    Post subject: newbee question Reply with quote

what does the * do in this routine?
(if (not *last_num*)(setq *last_num* 1))

Back to top
Adesu



Joined: 20 Jul 2005
Posts: 31

Posted: Mon Oct 03, 2005 12:24 am    Post subject: Re: newbee question Reply with quote

G wrote:
what does the * do in this routine?
(if (not *last_num*)(setq *last_num* 1))


Hi G,I think that do you mean,is variable and not meaning anything,look at code,then for other function ,if user only hit enter variable "*last_num* " would be set to 1.

Code:

(setq *last_num* (getreal "\nEnter new value<1>: "))
(if
  (not *last_num*)
  (setq *last_num* 1)
  )
Back to top
View user's profile Send private message
mguzik@nospamlawson-fishe
Guest





Posted: Tue Oct 04, 2005 8:10 pm    Post subject: Re: newbee question Reply with quote

It is coding convention to identify these as global variables. Could
have just as easily have been (setq glob_last_num last_num).

Nothing special, just a way to identify type of variable when reading
code.

After running the above line once, you can assess to value of
*last_num* by typing !*last_num*. Often used to return the previous
value last set when the routine was run in the current session.

MJG

Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
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




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB