home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!caen!destroyer!news.itd.umich.edu!potts
- From: potts@oit.itd.umich.edu (Paul Potts)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: faulty ANSI in Think C 5.0?
- Date: 17 Nov 1992 19:13:57 GMT
- Organization: Instructional Technology Laboratory, University of Michigan
- Lines: 26
- Message-ID: <1ebg9lINNi8e@terminator.rs.itd.umich.edu>
- References: <1992Nov16.211648.23619@math.ucla.edu>
- NNTP-Posting-Host: helen.oit.itd.umich.edu
-
- In article <1992Nov16.211648.23619@math.ucla.edu> dchopp@vicente.math.ucla.edu (David Chopp) writes:
- >I'm curious if others have run into similar problems as I regarding using
- >some ANSI subroutines in Think C 5.0.2 with TCL. In particular, I have
- >trouble using strcpy, strcmp, sprintf, to name a few. I have found them
- >to be sporadic in working properly and I'm wondering if I'm doing something
- >wrong. For example, in one object, I'll have two methods each using strcpy
- >in them (all in the same file). In one context, it works perfectly, in the
- >other it fails to copy. The arguments being passed are all correct (I've
- >checked them several times).
-
- I'd say it is most likely that there is a problem in your program. I've
- used sprintf, strcpy, strcmp, etc. and had them work fine.
-
- Some things to consider: are you testing the arguments under the source-level
- debugger, or at runtime under MacsBug? The source-level debugger and the
- low-level debugger can show different things. Under the source debugger
- sometimes memory is better initialized, pointers tend not to penalize you
- for writing to stray addresses, etc. Whenever I've had problems using
- the string routines, they were caused by some other part of my code which
- was trashing memory at runtime.
-
- Post some examples, maybe that would help.
-
- --
- Politics is crime pursued by other means.
- potts@oit.itd.umich.edu CI$ 71561,3362 (rarely)
-