This wiki is out of date, use the continuation of this wiki instead

Fgets

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 12:27, 26 June 2007 (edit)
Sandman (Talk | contribs)

← Previous diff
Revision as of 12:35, 26 June 2007 (edit) (undo)
Sandman (Talk | contribs)

Next diff →
Line 3: Line 3:
==Definition== ==Definition==
-'''STRING''' fgets ( <'''INT''' filehandle> )+'''STRING''' file ( <'''STRING''' filename> )
-Reads a line from a certain file and returns it. Subsequent calls will return the next line, until the end of the file is reached. +Returns the whole contents of a certain file.
== Parameters == == Parameters ==
{| {|
-| '''INT''' filehandle || - The handle of the file returned by [[fopen]].+| '''STRING''' filename || - The filename of the file you wish to read from (including extension and possible path).
|} |}
== Returns == == Returns ==
-'''STRING''': The line read.+'''STRING''': The contents of the file.
- +
-== Notes ==+
-The returned string normally does not contain the '\n' or '\r','\n' charactersets.+
- +
-When a line ends with the character '\', the next line will be joined with the current one, changing the '\' character to a '\n' character.+

Revision as of 12:35, 26 June 2007


Definition

STRING file ( <STRING filename> )

Returns the whole contents of a certain file.

Parameters

STRING filename - The filename of the file you wish to read from (including extension and possible path).

Returns

STRING: The contents of the file.

Personal tools