"Jacob Eisenhardt" <icenhard@"slet"hotmail.com> writes:
> Hvordan for man en retur værdi med tilbage i sit program
Har du prøvet at læse system(3)?
Der står blandt andet:
,----[ Udsnit af system(3) ]
| RETURN VALUE
| The value returned is -1 on error (e.g. fork failed), and
| the return status of the command otherwise. This latter
| return status is in the format specified in wait(2).
| Thus, the exit code of the command will be WEXITSTA-
| TUS(status). In case /bin/sh could not be executed, the
| exit status will be that of a command that does exit(127).
|
| If the value of string is NULL, system() returns nonzero
| if the shell is available, and zero if not.
|
| system() does not affect the wait status of any other
| children.
`----
Der er også et enkelt eksempel.
--
Jacob -
www.bunk.cc
A tautology is a thing which is tautological.