How to find number from 200 to 450

Discussion in 'AutoCAD' started by Adesu, Jul 6, 2004.

  1. Adesu

    Adesu Guest

    I've got loop program from forum,see below;
    (setq cnt 0)
    (repeat 500 (princ "\n")(princ cnt)(princ " = ")
    (princ (chr cnt))(setq cnt (1+ cnt)))
    How to find number from 200 to 450,can anybody know?
    Best regards
    Ade Suharna
     
    Adesu, Jul 6, 2004
    #1
  2. Adesu

    zeha Guest

    Try this

    (setq cnt 0)
    (repeat 500
    (cond ((and (>= cnt 65)(< cnt 128))(princ "\n")(princ cnt)(princ " = ")(princ (chr cnt)))
    ((and (>= cnt 128)(< cnt 450))(princ "\n")(princ cnt)(princ " = ")(princ (chr cnt)))
    ((>= cnt 450)(princ "\rThis is >= 450"))
    (T (princ "\rThis is the rest"))
    )
    (setq cnt (1+ cnt)))
     
    zeha, Jul 6, 2004
    #2
  3. Adesu

    Adesu Guest

    Hi zeha,that right and thanks a lot
     
    Adesu, Jul 7, 2004
    #3
  4. Adesu

    Jon Guest

    or
    (if
    (equal cnt 325 125)(go for it)
    )
    Jon Rasmussen
     
    Jon, Sep 15, 2004
    #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.