Code Red > AutoLISP (Vanilla / Visual)

Greater than and Less than

(1/1)

whdjr:
What would be the easiest way to test if a num was between two numbers without declaring any variables?


--- Code: ---(setq enum "5")
(< (> (ascii enum) 49) 57)
--- End code ---

I am trying to determine if a string is really a number or if it is a letter.

T.Willey:
(< 4 5 6)

Tim

MP:

--- Code: ---(defun IsDigit ( x )
    (< 47 (ascii x) 58)
)
--- End code ---

Mark:
Checkout the following [ http://www.theswamp.org/forum/index.php?topic=3710.0 ] CAB has one in there as well.

whdjr:
Thanks guys that's what I needed.  I knew I had seen a way like that I just come up with it.

Navigation

[0] Message Index

Go to full version