I am currently creating a class for writing and reading arrays. Opening a file, closing a file works well. Alternatively, I can write an array to a bin file. But returning an array from a class is a bridge away. So far, there are 2 problems that I can’t work with.
1) in the public section, the ReadArrFromFile function: an array of single ones; ==> expected identifier, but found array and incompatible types of single and dynamic array
2) In the implementation with the function Tbinfiles.ReadArrFromFile: an array of single , ==> I always get the identifier E2029, but ARRAY found
For 1) if I define a single array in the main program, this does not cause any problems 2) the same for ReadArrFromFile works fine in the main program
I work with codegear RAD delphi 2007 and Windows Vista.
unit UbinFiles; interface type TBinFiles = Class private pFileName : String; // File name (FILENAME.bin) pFileType : string; // File type (of .. ) pFileLoc : string; // FileLocation path pMyarr : array of single; // array to receive / provide results pArrLen : integer; // To define arraylength pFKA : file; // File Known As or the internal name pRecsWritten : integer; //
source share