From: igor denisov <saufesma@gmail.com>
To: 21510@debbugs.gnu.org
Subject: bug#21510: output
Date: Fri, 18 Sep 2015 12:58:56 +0700 [thread overview]
Message-ID: <CAE0=M6o=-akE6bMFfys21CVOXHUt15e0-9PwXHCZBOoCskxFqQ@mail.gmail.com> (raw)
; Contract: Number, Number->Number
(defun sub (a b)
(- a b))
;; Contract: Number, Number->Number
(defun sum (a b)
(+ a b))
(defvar height-list
(let ((Hmc 4)
(step 0.8))
(setq Hcw (sum Hmc step))
(setq Hcs (sub Hmc step))
(setq Htr (sum Hmc step))
(list Hmc Hcw Hcs Htr)))
(defvar tooth-height-list
(let ((hmc 0.8)
(step 0.2))
(setq hcw (sum hmc step))
(setq hcs (sub hcw step))
(setq htr (sum hmc step))
(list hmc hcw hcs htr)))
(defvar angle-list
(let ((Amc 70)
(step 5))
(setq Acw (sub Amc step))
(setq Acs (sub Amc step))
(setq Atr (sub Amc step))
(list Amc Acw Acs Atr)))
(defvar base-list
(let ((Bmc 4)
(step 0.8))
(setq Bcw (sub Bmc step))
(setq Bcs Bmc)
(setq Bcw Bcs)
(setq Btr Bmc)
(list Bmc Bcw Bcs Btr)))
(defvar pitch-list
(let ((Pmc 2)
(step 1))
(setq Pcw (sum Pmc step))
(setq Pcs (sum Pcw step))
(setq Ptr Pmc)
(list Pmc Pcw Pcs Ptr)))
;; Number of tooth in a row per 1cm
(defun Nz (pitch-number)
(100/pitch-number))
;; Number of rows per 1cm
(defun Nr (base-number)
(100/base-number))
;; parts per square cm
(defun ppsc-calc (a b)
(* a b))
;; List of numbers of tooth in a row per 1cm
(defun list-of-Nz (pitch-list)
(if (not pitch-list) ; do again test
nil
(cons
(Nz (car pitch-list))
(list-of-Nz (cdr pitch-list))))) ;next step expression
;; List of number of rows per 1cm
(defun list-of-Nr (base-list)
(if (not base-list) ; do again test
nil
(cons
(Nr (car base-list))
(list-of-Nr (cdr base-list))))) ;next step expression
(defvar list-of-ppsc)
;; List of part per square cm
(defun list-of-ppsc-calc (pitch-list base-list)
(if (and (not pitch-list)
(not base-list))
nil
(setq list-of-ppsc (cons
(ppsc-calc (car pitch-list) (car base-list))
(list-of-ppsc-calc (cdr pitch-list) (cdr base-list))))))
(list-of-ppsc-calc pitch-list base-list)
list-of-ppsc
(defvar PPSCmc)
(defvar PPSCcw)
(defvar PPSCcs)
(defvar PPSCtr)
On issuing the following
(defvar PPSCmc (car list-of-ppsc))
PPSCmc
output is quite strange
8 (#o10, #x8, ?\C-h)
why?
next reply other threads:[~2015-09-18 5:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-18 5:58 igor denisov [this message]
2015-09-18 14:41 ` bug#21510: output Drew Adams
2015-09-19 8:19 ` igor denisov
2015-09-19 14:18 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAE0=M6o=-akE6bMFfys21CVOXHUt15e0-9PwXHCZBOoCskxFqQ@mail.gmail.com' \
--to=saufesma@gmail.com \
--cc=21510@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.