Results 1 to 3 of 3

Thread: newbee question

  1. #1
    G Guest

    newbee question

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

  2. #2
    Join Date
    Jul 2005
    Posts
    31
    Quote Originally Posted by G
    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)
      )

  3. #3
    mguzik@nospamlawson-fishe Guest
    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

Similar Threads

  1. As machined / As Welded - newbee
    By Ronan in forum SolidWorks
    Replies: 3
    Last Post: 04-13-2005, 08:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other forums: Access Forum - Microsoft Office Forum - Exchange Server Forum