library function question

From: Paul Fedorenko (pfedorenko_at_look.ca)
Date: 05/29/04


Date: Fri, 28 May 2004 22:23:46 -0400

I've just started taking a C programming class. The instructor claims
to be teaching us standard ANSI C, which should be compatible with all
compilers. Thing is, he's been teaching the class to use a particular
function, which is supposed to be a part of stdio.h, and he'll be
teaching more uses for it in the future. The function in question is:

        system("clear");

which apparently symply clears the screen (standard 80 column x 25
line UNIX console) at the moment.

Now... I'm not sure if compiler specific questions here, but since
I'm not sure where to post this, I'm hoping all will be well in the
end.

My problem is that none of the compilers I've tried it with seem to
include that function. I've tried Open Watcon and gcc under Windows
and gcc under Linux, to no avail. At the school, we're using a
compiler called xlc under IBM's AIX operating system.

So... does anyone know where I might be able to find a protype (or
find out how to write one myself) that I could add to my compilers at
home so that I can actually get my assignments done without having to
rely on using the campus labs all the time? Preferably someone who's
used xlc, I guess.

Any pointers would be greatly appreciated.



Relevant Pages

  • Re: Doubts about pointers
    ... co-exists well with their preferred operating system (or the one used ... Using "as many C compilers as possible", ... learning of the language itself. ... of what is possible given the constraints of the teaching environment. ...
    (comp.lang.c)
  • Re: HardBound and SoftBound
    ... Wilco Dijkstra wrote: ... You can also get the same surprising result on xlc on AIX. ... I found a very good explanation of possible alias models and the one defined for ISO standard C on: ... You may need to split the two functions up into two files to inhibit inlining with some of these compilers. ...
    (comp.arch)
  • Re: xlf vs xlc
    ... I have to compare the running times of C++ programs (compiled with xlC) ... while F77 programs do not use any library calls. ... additional optimizations from xlf, that xlC cannot apply to C++ ... by these two compilers. ...
    (comp.unix.aix)
  • Re: Free UNIX for non-commerical use.
    ... > with UNIX operating systems and compilers. ... > likely use gcc instead and have to accept the poorer performance. ... in your source to keep the vendor compilers from producing invalid code. ... Never got working binaries from any GNU code with xlc and "-O5". ...
    (comp.unix.solaris)
  • Re: Free UNIX for non-commerical use.
    ... > with UNIX operating systems and compilers. ... > likely use gcc instead and have to accept the poorer performance. ... in your source to keep the vendor compilers from producing invalid code. ... Never got working binaries from any GNU code with xlc and "-O5". ...
    (comp.sys.hp.hpux)