Difference between revisions of "Readchar"
From Mesham
Jump to navigationJump to searchm (5 revisions imported) |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
#include <io> | #include <io> | ||
− | var f:=open("hello.txt","r"); | + | |
− | + | function void main() { | |
− | + | var f:=open("hello.txt","r"); | |
+ | var u:=readchar(f); | ||
+ | close(f); | ||
+ | }; | ||
+ | |||
+ | ''Since: Version 0.41b'' | ||
[[Category:Function Library]] | [[Category:Function Library]] | ||
[[Category:IO Functions]] | [[Category:IO Functions]] |
Latest revision as of 15:44, 15 April 2019
Overview
This readchar(f) function will read a character from a file with handle f. The file handle maintains its position in the file, so after a call to read char the position pointer will be incremented.
Example
#include <io> function void main() { var f:=open("hello.txt","r"); var u:=readchar(f); close(f); };
Since: Version 0.41b