[comp.sys.amiga.programmer] Neophyte seeking guidance

barbecue@pine.circa.ufl.edu (MERCER) (02/28/91)

Hi.
     I am a newcomer to C programming, although I have had my 
Amiga 500 (1.2 roms, 1 meg) for several years. I recently dusted 
off my ancient Aztec C 3.6a compiler, and began trying to use 
it.  Now I have a few questions, some general and one specific.
The general questions first:
 1. My resources are very very limited, (witness my lack of 
hard drive) and I cannot casually dive into a major purchase.
I would like to know about the relative advantages/disadvantages
of Manx vs Lattice for a non-developer like myself.  (my programs
tend to be small utilities for my personal use, and some MIDI and
music related programs.)  Specifically, what about ANSI comp-
atibility?  portability?  So far I have been relatively happy
with Aztec C, (especially compared to Microsoft QuickC at work!)
but if I am gonna ask for a compiler for next christmas, which 
should it be? 
 2. In a related vein, I am looking for sources of information
and examples which I can use with my current setup.  For example,
lists of known bugs &| problems with my version of Aztec, short
source code examples, and compiler/assembler related utilities
such as debuggers, lint and make programs, etcetera.  Point me in
the direction of an FTP site, or a specific fish disk, and I will
be eternally grateful.  I have done extensive perusing on my own,
but thus far the pickings have been slim.  There are just too many
things out there!
 3. Now for the specific question, one which my lack of experience
led me to believe was a mistake on my part for several days, until
I finally concluded that it must be a problem with my compiler.
I was attempting to make use of the library functions strchr() and 
strrchr() in a programming assignment, and repeatedly encountered
a ptr/int conversion error when I used a line like this:

 sptr = strchr( string, c);

 (where sptr is a char *)
however when sptr is declared as an int, the warning goes away.
Yet the manual and every book and source I have consulted all
agree that these functions should return a char *, not an int.
I tried working on the assumption that the int returned was
an index to the location of the char within the string, but got 
garbage.  Now I don't absolutely need these functions, but by 
golly, it is driving me bonkers that they are behaving so oddly.
What is the scoop on these critters, and can anyone tell me 
of any other similar language "features" that I should look out
for? 
          Thank you in advance, replies via mail preferred.
------------
Bill Mercer
BARBECUE@pine.circa.ufl.edu - Internet
BARBECUE@UFPINE - BITNET