anchor.diff:    ); while
     (setq pnlNum (atoi (substr txt 1 (1- index))))
     (setq strNum (atoi (substr txt (1+ index))))
  -
     ; increment the label
     (setq pnlNum (+ pnlNum jump))
     (while (> pnlNum *pnlLim)
       (setq pnlNum (- pnlNum *pnlLim))
       (setq strNum (1+ strNum))
     ); while
  -  (setq txt (strcat (itoa pnlNum) "." (itoa strNum)))
  -  (setq entInfo (subst (cons 1 txt) (assoc 1 entInfo) entInfo))
  -  (entmod entInfo)
  +  ; terminate if the label is outside of the limit
  +  (if (> strNum *strLim)
  +    (progn
  +      (alert "You have reached the end of the last string.")
  +      (setq term 1)
  +    ); progn
  +    (progn
  +      (setq txt (strcat (itoa pnlNum) "." (itoa strNum)))
  +      (setq entInfo (subst (cons 1 txt) (assoc 1 entInfo) entInfo))
  +      (entmod entInfo)
  +    ); progn
  +  ); if
     (princ)
  -  ;(if (> strNum *strLim)
  -  ;TODO: alert when it reaches above the limit
  -  ;); if
   )
   
  -; currently working on it
  -;(defun ask-int (var msg mod / vval tmp)
  -;  ;; Asks for an integer value to set into the variable, defaulting to the previous value
  -;  (cond
  -;    ( (= mod 1)
  -;      (setq vval (getint (strcat "\n" msg " <"
  -;				(cond (var (itoa var)) ("1"))
  -;				; offer previous value if present; otherwise 1
  -;				">: "
  -;			 ); strcat
  -;		 ); getint
  -;      ); setq
  -;      (setq var
  -;	     (cond (vval) (var) (1))
  -;      ); setq
  -;    ); mod1
  -;    ( (= mod 2)
  -;      (while
  -;	(> (setq vval (getint (strcat "\n" msg " <"
  -;				      (cond (var (itoa var)) ("1"))
  -;				      ; offer previous value if present; otherwise 1
  -;				      ">: "
  -;				); strcat
  -;		      ); getint
  -;	   ); setq
  -;	lim
  -;	); if current panel number is bigger than the limit
  -;	(princ (strcat " must be less than " (itoa lim)))
  -;      ); while
  -;     (setq var
  -;	 (cond (vval) (var) (1))
  -;  ); setq
  -;    ); mod2
  -;  ); cond
  -;)
  +(defun ask-int (var msg mod lim / tmp)
  +  ;; Asks for an integer value to set into the variable, defaulting to the previous value
  +  (cond
  +    ( (= mod 1)
  +      (set var
  +	(cond
  +	  ( (getint
  +	      (strcat "\n" msg " <"
  +		      (if (eval var) (itoa (eval var)) "1")
  +		      ">: "
  +	      ); strcat
  +	    ); getint
  +	  )
  +	  ((eval (cond ((eval var)) (1))))
  +	); cond
  +      ); set
  +    ); mod1
  +    ( (= mod 2)
  +      (while
  +	(>(setq tmp
  +	    (cond
  +	      ( (getint
  +		  (strcat "\n" msg " <"
  +			  (if (eval var) (itoa (eval var)) "1")
  +			  ">: "
  +		  ); strcat
  +		); getint
  +	      )
  +	      ((eval (cond ((eval var)) (1))))
  +	      ); cond
  +	    ); setq
  +	  (eval lim)
  +	); if current input is bigger than the limit
  +	(princ (strcat " must be less than " (itoa (eval lim))))
  +	); while
  +      (set var tmp)
  +    ); mod2
  +  ); cond
  +)
   
  -(defun C:Label(/ term txt tmpsl tmppl tmpsc tmppc entName entType entInfo)
  +(defun Replace(/ term txt tmpsl tmppl tmpsc tmppc entName entType entInfo)
     ; initialize
  -;  (ask-int (eval *pnlLim) "Enter number of panels per string" 1)
  -;  (ask-int '*strLim "Enter number of strings existing" 1)
  -;  (ask-int *pnlCur "Enter current panel number" 2)
  -;  (ask-int *strCur "Enter current string number" 2)
  -  (setq tmppl
  -	 (getint
  -	   (strcat "\nEnter number of panels per string <"
  -		   (cond (*strLim (itoa *strLim)) ("1"))
  -		   ; offer previous value if present; otherwise 1
  -		   ">: "
  -	   ); strcat
  -	 ); getint
  -  ); setq
  -  (setq *pnlLim
  -	 (cond (tmppl) (*pnlLim) (1))
  -  ); setq
  -  (setq tmpsl
  -	 (getint
  -	   (strcat "\nEnter number of strings existing <"
  -		   (cond (*strLim (itoa *strLim)) ("1"))
  -		   ; offer previous value if present; otherwise 1
  -		   ">: "
  -	   ); strcat
  -	 ); getint
  -  ); setq
  -  (setq *strLim
  -	 (cond (tmpsl) (*strLim) (1))
  -  ); setq
  -  (while
  -    (> (setq tmppc
  -	      (getint
  -		(strcat "\nEnter current panel number <"
  -			(cond (*pnlCur (itoa *pnlCur)) ("1"))
  -			; offer previous value if present; otherwise 1
  -			">: "
  -		); strcat
  -	      ); getint
  -	    ); setq
  -       *pnlLim
  -    ); if current panel number is bigger than the limit
  -    (princ (strcat " must be less than " (itoa *pnlLim)))
  -  ); while
  -  (setq *pnlCur
  -	 (cond (tmppc) (*pnlCur) (1))
  -  ); setq
  -  (while
  -    (> (setq tmpsc
  -	      (getint
  -		(strcat "\nEnter current string number <"
  -			(cond (*strCur (itoa *strCur)) ("1"))
  -			; offer previous value if present; otherwise 1
  -			">: "
  -		); strcat
  -	      ); getint
  -	    ); setq
  -       *strLim
  -    ); if current string number is bigger than the limit
  -    (princ (strcat " must be less than " (itoa *strLim)))
  -  ); while
  -  (setq *strCur
  -	 (cond (tmpsc) (*strCur) (1))
  -  ); setq
  +  (ask-int '*pnlLim "Enter number of panels per string" 1 9001)
  +  (ask-int '*strLim "Enter number of strings existing" 1 9001)
  +  (ask-int '*pnlCur "Enter current panel number" 2 *pnlLim)
  +  (ask-int '*strCur "Enter current string number" 2 *strLim)
   
     (setq term 0) 
     (while (= term 0)
  
positive.code:   ); if
  )
  
  (defun incrementEntityBy (jump inp / index entInfo txt pnlNum strNum)
    (setq entInfo (entget inp))
    (setq index 1)
    (setq txt (cdr (assoc 1 entInfo))); (pnlNum).(strNum)
  
  
negative.code:   (princ)
  )
  
  (defun Increment (/ term tmpj ss ssl index)
    (ask-int 'jump "Enter how much you would increment by" 1 9001)
  
    (setq term 0)
    (while (not ss)
      (setq ss (ssget '((0 . "TEXT,MTEXT"))))
    ); while
    (setq ssl (sslength ss))
    (setq index 0)
    (while (and (> ssl index) (= term 0))
      (incrementEntityBy jump (ssname ss index))
      (setq index (1+ index))
    ); while
  )
  
  (defun Label(/ funcMod)
    (initget 1 "r i")
    (setq funcMod (getkword "\nWould you like to [R]eplace label, or [I]ncrement label? "))
    (cond
      ((= funcmod "r") (Replace))
      ((= funcmod "i") (Increment))
    )
  )
  