Dayananda Posted 11 hours ago Posted 11 hours ago (- botLength 6000) If this value is a minus value , I need to set it zero. Please help Quote
dexus Posted 9 hours ago Posted 9 hours ago You mean like this? (if (minusp botLength) 0 (- botLength 6000)) 1 1 Quote
Saxlle Posted 9 hours ago Posted 9 hours ago (if (= (minusp botLength) T) ;; verifies that a number is negative (setq botLength 0) ;; if it is, it will set to 0 (setq botLength (- botLength 6000)) ;; if it isn't, it will be substracted with "6000" ) 1 1 Quote
Steven P Posted 6 hours ago Posted 6 hours ago If (- botLength 6000) is minus.... (if (= (minusp (- botlength 6000)) T) ;; verifies that a number is negative (setq botLength 0) ;; if it is, it will set to 0 (setq botLength (- botLength 6000)) ;; if it isn't, it will be substracted with "6000" ) ;;End If 1 Quote
Saxlle Posted 6 hours ago Posted 6 hours ago 12 minutes ago, Steven P said: If (- botLength 6000) is minus.... (if (= (minusp (- botlength 6000)) T) ;; verifies that a number is negative (setq botLength 0) ;; if it is, it will set to 0 (setq botLength (- botLength 6000)) ;; if it isn't, it will be substracted with "6000" ) ;;End If Just another example, nice, also it would work. Quote
marko_ribar Posted 5 hours ago Posted 5 hours ago (if (minusp (- botLength 6000)) (setq botLength 6000) ) 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.