index

Varkon MBS Programmers manual


inlin - Function

Description

Reads characters from the current position of a text file until end-of-line is found. The end of line character itself is read but not appended to the string returned by inlin(). The new current position is set to the first character after the end of the line.

Syntax

  s:=inlin(f);

  string s;
  file   f;

Principal parameters

f - The name of a filevariable associated with a file open for read or update (R or U)

Optional parameters

None.

Return value

A STRING containing the characters read. If the line is longer than 132 characters the entire line is read but the result truncated to 132 characters.

Comments

End of line is the linfeed character ASCII 10 in a UNIX textfile but the combination of linefeed and carriage return in Microsoft Windows, ASCII 10 + ASCII 13. This may cause problems if you try to read a textfile created by Microsoft Windows with a Varkon system running under UNIX. The UNIX command tr -d '\r' can be used to strip the extra carriage return characters from a Windows text file.

See also

instr() and iostat()


SourceForge.net Logo

Varkon 1.19D svn # 120M