LISP statements execute out of order

Discussion in 'AutoCAD' started by wkiernan, Jan 30, 2004.

  1. wkiernan

    wkiernan Guest

    Here's something odd; try this:

    (defun out_of_order()
    (princ "\nHello! You'd expect")
    (princ "\nthese lines to be displayed")
    (princ "\nbefore the dialog box opens, but...")
    (setq fname (getfiled "Pick a file any file" "" "" 0))
    )

    You get the first two lines, then the getfiled dialog box opens, and only after that does AutoCAD display the last line. What gives?
     
    wkiernan, Jan 30, 2004
    #1
  2. Try this:

    (defun out_of_order()
    (princ "\nHello! You'd expect")
    (princ "\nthese lines to be displayed")
    (princ "\nbefore the dialog box opens, but...\n") ;<- note slight change
    (setq fname (getfiled "Pick a file any file" "" "" 0))
    )


    --
    R. Robert Bell, MCSE
    www.AcadX.com


    | Here's something odd; try this:
    |
    | (defun out_of_order()
    | (princ "\nHello! You'd expect")
    | (princ "\nthese lines to be displayed")
    | (princ "\nbefore the dialog box opens, but...")
    | (setq fname (getfiled "Pick a file any file" "" "" 0))
    | )
    |
    | You get the first two lines, then the getfiled dialog box opens, and only
    after that does AutoCAD display the last line. What gives?
     
    R. Robert Bell, Jan 30, 2004
    #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.