home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / text / tex / 14867 < prev    next >
Encoding:
Internet Message Format  |  1993-01-12  |  1.3 KB

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