Example String fileRead 002
|
regs:((CharPointer:fp) cc)
vars:(fileRecord)
(setq fileID (fileOpen "testReadRecord.txt" 1 0))
(fileWrite fileID {abcdefghijklmnopqrstuvwxyz} )
(fileClose fileID 1)
(setq fileID (fileOpen "testReadRecord.txt" 0 0))
(setq fileRecord (new Vector: Byte: 30))
(setq fp fileRecord)
(fileRead fileID fp 20)
(setq cc fp[0])
(writeln "First character in the file is: " (char cc))
(fileClose fileID 0)
) Returns:
Here are examples of the fileRead function at work.
String fileRead 001 | String fileRead 002 | String fileWrite 001 |
Here is the link to the current function used in this example.
Here are a number of links to other related functions.
fileReadRecord(#void) | fileClose(#void) | fileOpen(#void) | fileWrite(#void) |
Here are the links to the data types of the arguments used in this example. Here are a number of links to examples having similar argument types.
Character
String
ByteVector
Analytic Information Server (AIS)AIS Component Systems
|