FGETC

Concept Link IconSee also

Read a single character from a file.

WebVue support - Yes.

Before using any of the file management instructions, except FSTAT, RENAME, UNLINK, FILETOBUF or BUFTOFILE, you must first open the file using an FOPEN instruction.

Before any program including the FOPEN instruction ends, it must execute an FCLOSE instruction.

Syntax

StrVal = FGETC(Filename);

Return type: STR.

Argument

Meaning

Filename

The file from which the character is to be read. Type STR.
If executed in a WebVue session context this instruction is processed by the computer that hosts the web back end and the referenced file is on that computer.

Execution

StrVal

Each time a character is read the file pointer is incremented by 1 character.

Example

str1 = FGETC("histo.fil");