file
hFile;
string
sName = "test.txt";
string sVar;
bool bSuccess = true;
# Open the File
hFile
= OpenFile(sName, "w");
# Write some messages to the file
WriteFile(hFile, "The Phantom Strikes Again.");
WriteFile(hFile, "And Again...");
# Close the file
CloseFile(hFile);
# Re-open the file for writing
OpenFile(hFile, sName, "r");
# Read and display the whole file
while(bSuccess == true)
{
bSuccess = ReadFile(hFile, sVar);
disp(sVar);
}
# Close the file
CloseFile(hFile);
|