ReadBoolean: Boolean;
The ReadBoolean method reads a logical value from a binary file.
Executing the example requires a binary file 1.dat to be present in the root of the disc C.
Sub UserProc;
Var
File1: IFileInfo;
BinR: IBinaryReader;
b: Boolean;
Begin
File1:=New FileInfo.Attach("c:\1.dat");
If File1.Exists Then
BinR:=File1.OpenBinaryReader;
b:=BinR.ReadBoolean;
End If;
Dispose File1;
End Sub UserProc;
After executing the example, the "b" variable contains a logical value read from the 1.dat binary file.
See also: