home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!howland.reston.ans.net!spool.mu.edu!agate!ames!network.ucsd.edu!mvb.saic.com!info-tex
- From: carlos@snfep1.if.usp.br (Carlos Alberto M. Carvalho (r.2410))
- Newsgroups: comp.text.tex
- Subject: re: question about parsing numbers
- Message-ID: <9301121535.AA07984@snfep1.if.usp.br>
- Date: Tue, 12 Jan 93 13:35:20 EDT
- Organization: Info-Tex<==>Comp.Text.Tex Gateway
- X-Gateway-Source-Info: Mailing List
- Lines: 21
-
- bbeeton wrote on 09 January 1993:
- >julio dix (jd01@swtexas.bitnet, to comp.text.tex, jan 8) wants
- >to strip off the first digit from a series of digits in a box,
- >replacing the remaining digits into the same box.
- >
- >i won't tackle the boxing part of the question, but can explain
- >why the whole string of numbers is being gobbled at once.
- >
- >take a simpler example:
- > \newcount\num
- > \def\newnum#1#2.{\num=#1 \def\rest{#2}}
- > \newnum12345.
- >this will end up with \num=12345 and \rest empty (with a delimited
- >string, the part between delimiters need not contain anything).
-
- I'm afraid this is incorrect. If you run the above commands and use
- \showthe\num and \show\rest you'll see that \num is indeed 1 and \rest is 2345.
- The reason is that the definition of an argument is independent of the
- replacement text of the macro.
-
- Carlos
-