Why would "prompt" be better than "princ"?

Discussion in 'AutoCAD' started by James Maeding, Jul 10, 2003.

  1. One of my users is getting errors on lisp routines that use the prompt statement.
    I always use princ not prompt. I am assuming the protected symbol prompt got defined to something else.
    Is there a way to set protected symbols back to the default values?

    Also, is there some setting that affects the prompt statement action, I thought it was a pretty vanilla function.
    thanks
    James Maeding
    Civil Engineer/Programmer
     
    James Maeding, Jul 10, 2003
    #1
  2. James Maeding

    Kevin Nehls Guest

    What is the error?

    --
    Kevin Nehls


    thought it was a pretty vanilla function.
     
    Kevin Nehls, Jul 10, 2003
    #2
  3. James Maeding

    John Uhden Guest

    James:
    The main (hmm... think it's "only") difference between (princ) and (prompt) is
    that (prompt) always returns nil.
    I use it a lot in Kosterized progressions...
    (and
    (or
    (= something 'T)
    (prompt "\nSomething is nil")
    )
    ;...
    )

    Now if your (someone's) program has used prompt as a global symbol, then that's
    an obvious no-no. Setting it back to its original value would require either
    reopening or starting a new drawing if LISPINIT is 1. If LISPINIT is 0, then
    you'll have to turn it back on and reopen, start new, or shut down AutoCAD and
    start it up again, hopefully correcting the errant code in between.



    thought it was a pretty vanilla function.
     
    John Uhden, Jul 11, 2003
    #3
  4. thanks John

    "John Uhden" <>
    |>James:
    |>The main (hmm... think it's "only") difference between (princ) and (prompt) is
    |>that (prompt) always returns nil.
    |>I use it a lot in Kosterized progressions...
    |>(and
    |> (or
    |> (= something 'T)
    |> (prompt "\nSomething is nil")
    |> )
    |> ;...
    |>)
    |>
    |>Now if your (someone's) program has used prompt as a global symbol, then that's
    |>an obvious no-no. Setting it back to its original value would require either
    |>reopening or starting a new drawing if LISPINIT is 1. If LISPINIT is 0, then
    |>you'll have to turn it back on and reopen, start new, or shut down AutoCAD and
    |>start it up again, hopefully correcting the errant code in between.

    James Maeding
    Civil Engineer/Programmer
     
    James Maeding, Jul 17, 2003
    #4
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.