home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / amiga / programm / 17678 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  1.3 KB

  1. Path: sparky!uunet!spool.mu.edu!uwm.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!sunic!seunet!kullmar!piraya!overdose!Adam_Sjoegren
  2. From: Adam_Sjoegren@thesystem.bbs.bad.se (Adam Sjoegren)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Formatting strings, sprintf() <-> RawDoFmt()
  5. Message-ID: <OD.6badnetOA92-910-101_0F8AEBAC@piraya.bad.se>
  6. Date: Sun, 20 Dec 92 13:14:46 +0000
  7. Sender: BadNet@piraya.bad.se
  8. Reply-To: Adam_Sjoegren@thesystem.bbs.bad.se (Adam Sjoegren)
  9. Distribution: world
  10. Organization: The system, Frederiksberg Copenhagen, Denmark 
  11. OD-Comment-To: All
  12. Lines: 23
  13.  
  14.  
  15. Why does the same formatting string used in sprintf() and RawDoFmt()
  16. not result in the same?
  17.  
  18. For instance:
  19.  
  20.  rawsprintf(buf, "%5.0ld - %4.1ld (%2.1ld%%)\n", x, y, z);
  21.  /* Doug's magic */
  22.  
  23. Does not result in the same 'buf' as the same formatting string run
  24. through standard sprintf(). How come? I thought that the
  25. %<num>.<num><typ> was supposed to be some kind of standard?
  26.  
  27. Am I missing something?
  28.  
  29.   .
  30.  /|dam
  31.                 .                             .
  32.                -*-                           -*-
  33.  Adam Sjoegren   \O_ asj@thesystem.bbs.bad.se  \O_  +:+: The system :+:+
  34.  Copenhagen,      |  GCChost Support, Denmark   |   "The magician longs"
  35.  Denmark, Europe / \  Still running A500 )-:   / \  BBS    +45-31-354775
  36. --- 
  37.