AutoLISP: what does the character

Discussion in 'AutoCAD' started by jfrog, Jan 14, 2005.

  1. jfrog

    jfrog Guest

    I recently downloaded some lisp code, and one of the lines was simply:

    | ;

    Thinking it was a typo, I commented it out, and the functions following it were ignored.

    So... what does the character "|" (ASCII 124, not a capital "i") indicate or do?
     
    jfrog, Jan 14, 2005
    #1
  2. jfrog

    T.Willey Guest

    To write lines in the routine like a paragraph you use the pipe (|) character like this

    ;|
    This will not be read by AutoCAD when loading the lisp.
    Neither will this.
    |;

    Tim
     
    T.Willey, Jan 14, 2005
    #2
  3. jfrog

    jfrog Guest

    thanks...that's interesting. That also explains why when I modified it to be:

    ;|;

    everything beyond that point changed to a comment (I was viewing it it the VisualLISP editor)
     
    jfrog, Jan 14, 2005
    #3
  4. jfrog

    Tom Smith Guest

    Look up comments in help. That was the closing of a multi-line comment, as
    per the help example:

    setvar "orthomode" 1) ;|comment starts here
    and continues to this line,
    but ends way down here|; (princ "\nORTHOMODE set On.")
     
    Tom Smith, Jan 14, 2005
    #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.