General AutoLISP question

Discussion in 'AutoCAD' started by Cliff Davis, Dec 5, 2003.

  1. Cliff Davis

    Cliff Davis Guest

    Currently I have been setting up functions in a file as follows

    ;begin file
    (defun common_function ()
    (..............)
    )

    (defun c:Option1 ()
    (xxxxxxx)
    (common_function)
    )

    (defun c:Option2 ()
    (yyyyyyy)
    (common_function)
    )
    ; end file

    The problem I have run into is that if (common_function) is somehow defined as something else later it causes mayhem. Outside of
    making the function local to both c: functions, is there a better way of doing this to address this scenario.
    Thanks
    Cliff
     
    Cliff Davis, Dec 5, 2003
    #1
  2. Cliff Davis

    Cliff Davis Guest

    I have accidentally used the same function name again before, but my main concern is sending the code out to others where I have no
    control over what is defined. I guess I may start making function names more unique.
    Thanks
    Cliff
     
    Cliff Davis, Dec 8, 2003
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.