READF Statement

The READF statement reads the specified number of characters from a normal item.

Format

READF str FROM file.var,item.id,start.pos, no.of.bytes THEN/ELSE

Description

mvBASIC allows the user to read a specified number of characters from any normal item stored in a disk file. The format is very similar to READV, but rather than specifying the attribute to be read, the user specifies the starting position and number of bytes to read. READFU behaves like READVU and sets and obeys item locks.

If a starting position of 0 is specified, the number of bytes in the item is returned. If a starting position beyond the end of the item is specified, null is returned. If too many bytes are specified, as many as are available are returned.

See Also

Statement and Function Reference