[comp.sys.sgi] Help a beginning C'er!!

hart@blackjack.dt.navy.mil (Michael Hart) (08/02/90)

Just some clarifications and guidance, perhaps some wisdom!

I recently attended a Learning Tree International course on C - 
(which by the way, I thought was excellent!) - 
the instructor made a comment to the effect that one should 
never use 'scanf' in commercial grade software.  Is this the
general consensus?  If so, ...

What does one use in the SGI world ( while still wanting to
maintain portability to other systems with "standard" C
libraries) for console I/O?  Are there libraries that I'm unaware
of?  Like for instance:	
	I have to input an integer to a prog.:

        printf("Enter the number :  ");
        scanf("%d",&new_parm_record.number);

Is there a better/"smarter" way than this?  Should I use getw(),
then convert it with atoi()?  These questions would apply to any
and all types of numbers.  I don't anticipate any problems with
string input.

On libraries; is there a source for generally liked libraries
for SGI's?  I have the PANEL library, but I'm not nearly up to 
using that yet!  Also, I'd like to know how to write things that
are more or less easily portable to other machines, bearing in mind
that I'm not going to be writing anything (at least for some time yet)
that is extremely complex or graphical in nature.

Also, any hints, tricks, suggestions, or just little nuggets of 
wisdom and knowledge that you care to offer up are and will be 
greatly appreciated!!!


--
-------------------------------------------------------------------------------
Michael G. Hart   hart@blackjack.dt.navy.mil /  mhart@dtrc.dt.navy.mil
DTRC/DoD			  |  "Wherever you go, there you are."- me
DISCLAIMER: If you want the Navy's opinion, talk to Secretary Cheney.