%
% numberst.sty by uainoue@ipc.musashi-tech.ac.jp (INOUE Koichi)
%
\newcount\tempcode
\newcount\digit
\def\hexnumber{\afterassignment\writehexnumber\tempcode}
\def\writehexnumber{\ifnum0>\tempcode--\tempcode-\tempcode\fi
	\digit-\tempcode
	\divide\digit"10
	\multiply\digit"10
	\advance\digit\tempcode
	{\nexthexdigit}\ifcase\digit0\or1\or2\or3\or4\or5\or6\or7\or8\or9
		\or A\or B\or C\or D\or E\or F\else X\fi}
\def\nexthexdigit{\divide\tempcode"10
\ifnum0<\tempcode\writehexnumber\fi}
\def\milnumber{\afterassignment\writemilnumber\tempcode}
\def\writemilnumber{\ifnum0>\tempcode--\tempcode-\tempcode\fi
	\ifnum1000>\tempcode\number\tempcode
	\else\digit-\tempcode
		\divide\digit1000
		\multiply\digit1000
		\advance\digit\tempcode
		{\nextmildigit}\ifnum100>\digit\ifnum10>\digit
0\fi0\fi\number\digit
	\fi}
\def\nextmildigit{\divide\tempcode1000
\ifnum0<\tempcode\writemilnumber,\fi}
\def\hondanumber{\afterassignment\writehondanumber\tempcode}
\def\writehondanumber{\ifnum0>\tempcode--\tempcode-\tempcode\fi
	\ifnum10000>\tempcode\number\tempcode
	\else\digit-\tempcode
		\divide\digit10000
		\multiply\digit10000
		\advance\digit\tempcode
		{\nexthondadigit}\ifnum1000>\digit\ifnum100>\digit
			\ifnum10>\digit 0\fi0\fi0\fi\number\digit\fi}
\def\nexthondadigit{\divide\tempcode10000
\ifnum0<\tempcode\writehondanumber,\fi}
%
\endinput
%
% ---------------- SJIS KANJI follows -----------------------------
%
Newsgroups: fj.comp.texhax
From: uainoue@ipc.musashi-tech.ac.jp (INOUE Koichi)
Subject: [asobi no TeX] numbersty.sty (Re: sum of money)
Organization: Musashi Institute of Technology
Date: Thu, 27 Jan 1994 08:03:04 GMT
%
\documentstyle[...,numbersty]{...}�Ƃ��ĉ������B
\hexnumber1234���A4D2  \milnumber1234���A1,234  \milnumber123456789���A
123,456,789�ƂȂ�͂��ł��B
%
From: y-nisikw@kuee.kyoto-u.ac.jp (Yoshikiyo NISHIKAWA)
Date: Fri, 28 Jan 1994 09:02:41 GMT
%
���쁗����ł��D�����ɂ͏��߂Ăł��D
<UAINOUE.94Jan27170304@jupost.ipc.musashi-tech.ac.jp>�ɂ�����
numbersty.sty���g���Ă݂܂����D���̌��ʁC
(�����\�[�X�C�E������)
	\milnumber1234 -> 1,234 (����͐�����)	
	\milnumber1000 -> 1,0
	\milnumber1020 -> 1,20
	\milnumber1100 -> 1,100 (����͐�����)
	\milnumber1001 -> 1,1
	\milnumber1001234 -> 1,1,234
	\milnumber1000000 -> 1,0,0
�̂悤�ɂȂ�܂����D
�ǂ����R���}�̒��オ0�̏ꍇ�C����0����т���ɑ���0���o�Ȃ��悤�ł��D
(1,000,000�̂悤�ɁC�R���}�̒��ォ��0���R�������ɂ�
�Ō�́C�܂�R���}�̒��O�ɂȂ�0�͏o��悤�ł����D)
%
Date: Mon, 31 Jan 1994 06:14:00 GMT
%
����������ł����B���łɁA2^31������A�P�P���~���炢�ň����Ȃ��Ȃ�܂��B
���Ǘ��_�́A�u���l�ɑ΂��Ďg����v�ł��傤���ˁB\hexnumber\count0������
��͂��ł��B���ЂƂA���̐��l�������悤�ɂ��܂����̂Ŏg���Ă݂ĉ������B
�i���ł�\hondanumber�Ƃ����̂��j
