home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2040 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: informatik.tu-muenchen.de!fischerj
  2. From: fischerj@Informatik.TU-Muenchen.DE (Juergen "Rally" Fischer)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: manipulating the stack in C
  5. Date: 26 Jan 1996 04:01:30 GMT
  6. Organization: Technische Universitaet Muenchen, Germany
  7. Distribution: world
  8. Message-ID: <4e9jmq$ron@sunsystem5.informatik.tu-muenchen.de>
  9. References: <4e8b20$lsq@newshost.lanl.gov>
  10. NNTP-Posting-Host: hphalle5.informatik.tu-muenchen.de
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Luke Emmert (luke@raj2.tn.cornell.edu) wrote:
  14.  
  15. may I suggest you search for a different method. look, if stack should
  16. for some reason be at a low adress ( $4711 for example ), and you pass
  17. a $4711 arg your code will crash.
  18.  
  19. If this problem would not occur, taking care of all that dynamic stack
  20. calculation is likely to cause bugs.
  21.  
  22. why not save time and try some of these ideas:
  23.  
  24. for example 0 or $ffffffff indicates end of argumentlist. 
  25. all other arguments are not allowed to have this values, then.
  26.  
  27. or let the first argument be an argument count.
  28.  
  29. printf does kind of that method in indicating number of arguments
  30. in the string ("%d xxxx %s xxxx %c",int,char*,char).
  31.  
  32. please, not the "stack on itself" thingy :)
  33.  
  34. : * Luke Emmert   'luke@raj2.tn.cornell.edu'
  35. ------------------------------------------------------------------------
  36.    fischerj@Informatik.TU-Muenchen.DE (Juergen "Rally" Fischer)   =:)
  37.