Function: calcFunc-incr

calcFunc-incr is an autoloaded and byte-compiled function defined in calc-arith.el.gz.

Signature

(calcFunc-incr X &optional STEP RELATIVE-TO)

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calc-arith.el.gz
(defun calcFunc-incr (x &optional step relative-to)
  (or step (setq step 1))
  (cond ((not (Math-integerp step))
	 (math-reject-arg step 'integerp))
	((Math-integerp x)
	 (math-add x step))
	((eq (car x) 'float)
	 (if (and (math-zerop x)
		  (eq (car-safe relative-to) 'float))
	     (math-mul step
		       (calcFunc-scf relative-to (- 1 calc-internal-prec)))
	   (math-add-float x (math-make-float
			      step
			      (+ (nth 2 x)
				 (- (math-numdigs (nth 1 x))
				    calc-internal-prec))))))
	((eq (car x) 'date)
	 (if (Math-integerp (nth 1 x))
	     (math-add x step)
	   (math-add x (list 'hms 0 0 step))))
	(t
	 (math-reject-arg x 'realp))))