About "MeasureEm". Nov. 23, 1996 Kunihiro Saito (email: SGU02473@niftyserve.or.jp) Preface I'm a novice programmer for Newton Toolkit. I made some small packages as my exercise. All of them have common subject "measure something". I'm a very beginner, I can't understand "Soups" and I can't write beautiful program code yet. But I decide to distribute these programs with source code to show my programming tips to novice programmers same as me and to get some suggestions from expert programmers. If you are novice programmer, you can run and read program. And you can reuse every part of program code in my programs to your program. If you are expert programmer, will you point out any mistakes or bad coding style in my programs? But, you can't distribute modified version of these packages and source codes. To be flankly, these programs are silly programs. Don't except too much. And I don't guarantee the quality of these programs. And I'm not liable for events caused by these programs and documents. Overview "MeasureEm" consists of following 6 programs: 1. StopWatch It is normal stop watch and it can record 30 lap times. The preciseness of this watch is depend upon the Newton's one. 2. CountDownWatch It is a count down timer like a kitchen timer. 3. Rulers It can display, print, fax four type rulers (cm, inch, pica, point). Although it is not precise, but it will useful when you have no ruler and you have Newton. 4. EyeTestChart It can display, print, fax eye test chart. On Newton's display, you can change a gap of circle in eight directions. It can not print/fax chart correctly. (Help!) 5. TapCounter It is a numbering counter in Japanese style. It also works as ordinal numbering counter. It's tap area can be split in some parts. You can use this at time of a class representative election. 6. RangeFinder It is a tool for measuring the distance by triangulation. But Newton's display is too small to do triangulation. Therefore, it can measure 1-2m at longest. Development Environment Macintosh Iivx + System7.5.3 Japanized version (called as KanjiTalk7.5.3) NewtonToolKit 1.6.3 ResEdit 2.1.3 Microsoft Excel (to examine calculation method) Microsoft Word (to write this and spell check) Kyoei-Belt acrylic ruler A-2030 (to examine screen/printer outputs of "Rulers", "EyeTestChart" and "RangeFinder") Apple Personal Laser Writer 300 (to examine print out function of "Rulers" and "EyeTestChart".) It is confirmed that these package running on NMP110(OS1.3) and AMP130J(OS2.0) Acknowledgment Great thanks to Yosuke "Basuke" Suzuki. He advised useful techniques to me in Niftyserve FNEWTON forum. Thanks to Miwa-Megane the optician's shop in Niihama-City Ehime, Japan. Storekeeper of this shop taught me about eye test chart. Thanks to my wife and child. They forgive me for leaving them alone while I was in programming. Concluded to Japanese. はじめに 私は Newton Toolkit の初心者プログラマです。今回、自分自身の練習のために、小さい パッケージをいくつか作りました。これらのプログラムは、"なにかをはかる" ことをテー マに書かれています。 私はものすごいビギナーなので、「スープ」も理解していませんし、きれいなプログラム コードを書くことも出来ません。でも、今回これらのプログラムをソースコードと一緒に 配布することに決めたのは、私と同じ様な初心者に、私が使ったプログラミングのちょっ としたこつが提供できるかとか、エキスパートからはなにかアドバイスが得られるかも知 れないと考えたからです。 初心者の方は、プログラムを走らせ、コードを読んでみて下さい。私のプログラムの断片 のどこでも使ってもらってかまいません。エキスパートの方は、どうか私のプログラムの 誤りとか、悪いコーディングスタイルを指摘して下さい。 ただ、自分で変更したパッケージや、ソースコードを再配布するのは止めて下さい。 はっきり言って、これらのプログラムは非常につまらない物です。私はこれらに関する品 質の保証は一切しませんし、これらプログラムに起因することに関する責任を負いませ ん。 概要 "MeasureEm" は、次の 6 つのプログラムから出来ています: 1. StopWatch 通常のストップウォッチで、30 個までのラップタイムも記録できます。時計の正確性は、 Newton のそれに依存します。 2. CountDownWatch キッチンタイマーみたいなものです。 3. Rulers 4種類の(センチメートル・インチ・パイカ・ポイント)物差しを表示・プリント・fax で きます。これはあんまり正確ではありませんが、物差しがないけど Newton があるといっ た時には便利です。 4. EyeTestChart 視力検査表を、表示・プリント・fax できます。ただ、プリントと fax 出力にはバグがあ りますので、ちゃんと印字出来ません。(助けて下さい!) 5. TapCounter 日本的スタイルのナンバリングカウンターです。これは通常のナンバリングカウンタとし ても使えます。タップエリアはいくつかのパートに分割できます。学級委員の選挙などに お使い下さい。 6. RangeFinder 三角測量法を用いて距離を測るためのツールです。しかし、Newton のディスプレイは三角 測量法を使うには小さすぎますので、せいぜい 1-2 m 程度はかれるだけです。 開発環境 Macintosh Iivx + KT7.5.3) NewtonToolKit 1.6.3 ResEdit 2.1.3 Microsoft Excel (計算方法の検証とかに使いました) Microsoft Word (これを書いて、スペルチェックするのに使いました) Kyoei-Belt アクリル定規 A-2030 ( "Rulers", "EyeTestChart" , "RangeFinder" の出力 を検証するのに使いました) Apple Personal Laser Writer 300 ( "Rulers", "EyeTestChart" の出力を検証するのに 使いました) Panasonic Phone/Fax おたっくす ("Rulers", "EyeTestChart" の出力を検証するのに使い ました) いずれのプログラムも、NMP110(OS1.3)と、AMP130J(OS2.0)上での動作を確認しています。 謝辞 鈴木 "Basuke" 陽介さんには NiftyServe の FNEWTONフォーラムで有効なテクニックを教 えていただき、とてもお世話になりました。 愛媛県新居浜市の眼鏡屋「三和眼鏡」さんには、視力検査表について説明していただき、 参考になりました。 嫁さんと子供は、私がプログラミングをやってる間放ったらかしにしたことを許してくれ ました。 以上