inline comments

Discussion in 'AutoCAD' started by TCEBob, Dec 26, 2004.

  1. TCEBob

    TCEBob Guest

    Just found out by accident that comments may be placed in lines with the ;|. .
    ..|; style. Such as:

    ;|A|;(cond
    ( (= pt1tyep 'STR) ;User entered something at keyboard
    ;|B|; (cond
    ;|B.1|; (setq go 0) ;get out of program
    )
    ;|B.2|; ( (and (= (atof pt1) 0.0) ;evaluates to 0.0 -but atof gives 0.0 for
    alpha strings, too.
    (0string pt1) ;is in fact user-entered 0.0

    I think the vlisp editor will mess them up but the code runs fine.

    I'm not sold that it's a good idea -- but it does open possibilities. Anybody
    here make use of it?

    rs
     
    TCEBob, Dec 26, 2004
    #1
  2. TCEBob

    Dommy2Hotty Guest

    It's actually for comment blocking, such as headers in the .lsp file...used when you have more than one line of comments, usually...
     
    Dommy2Hotty, Dec 26, 2004
    #2
  3. TCEBob

    TCEBob Guest

    Yes, that's why I was interested that it works within a line, too.

    rs
     
    TCEBob, Dec 27, 2004
    #3
  4. I used them all the time, and they are supported by the VLIDE, and they are
    documented in the AutoLISP Developer's Guide.

    --
    R. Robert Bell


    "TCEBob" <tcebobatgwidotnet> wrote in message Just found out by accident that comments may be placed in lines with the ;|.
    ..
    ..|; style. Such as:

    ;|A|;(cond
    ( (= pt1tyep 'STR) ;User entered something at keyboard
    ;|B|; (cond
    ;|B.1|; (setq go 0) ;get out of program
    )
    ;|B.2|; ( (and (= (atof pt1) 0.0) ;evaluates to 0.0 -but atof gives 0.0
    for
    alpha strings, too.
    (0string pt1) ;is in fact user-entered 0.0

    I think the vlisp editor will mess them up but the code runs fine.

    I'm not sold that it's a good idea -- but it does open possibilities.
    Anybody
    here make use of it?

    rs
     
    R. Robert Bell, Dec 27, 2004
    #4
  5. TCEBob

    TCEBob Guest

    Well, durn, thanks for your input guys. I really thought that they were intended
    only for multiline comments and would screw up the end of a line. Just tried it
    in vlide and it survived formatting just fine.

    rs

    Living and Learning
     
    TCEBob, Dec 27, 2004
    #5
  6. TCEBob

    Dommy2Hotty Guest

    Okay...gotcha...
     
    Dommy2Hotty, Dec 27, 2004
    #6
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.