Home > Back-end >  Seek help, write a DATA format of the file to read in TXT format, thanks! And wait for
Seek help, write a DATA format of the file to read in TXT format, thanks! And wait for

Time:10-14

Code is such, from NuCoef. Reading the data file is assigned to plastic array Nals: 77 lines, five columns, and then the readings assigned to floating-point array Cls: 77 lines, 6 columns, if you want to help, could you please give me a E-mail, I put the NuCoef. Data files sent to you, you read out the number of deposit into TXT format file to me again, thank you!
The program Project1
Const NutNum=77;

Nals: array [1.. NutNum, 1.. 5] of interger;
Cls: array [1.. NutNum, 1.. 6] of extended;

The constructor TCoorTrans. Lni;
The begin
FStream:=TFileStream. Create (' NuCoef. Data, fmOpenRead);
FStream: Read (Nals, Sizeof (Nals));
FStream: Read (Cls, Sizeof (Cls));
FStream. Free;
end

CodePudding user response:

There are a few lines of code,
FileNme: string
FStream: TFileStream;

CodePudding user response:

NuCoef source file. The data I have to CSDN download resources inside, willing to help good people can direct download from the above, download method is to enter my space, more choose that option in the resource options, you can see I upload resources, source files on that. Or go directly to download the channel search NuCoef data, thank you

CodePudding user response:

What thing, m read

CodePudding user response:

You are really not fake or not ah, you all already know how to read out, also won't output text file?
Const
NutNum=77;
Var
Nals: array [1.. NutNum, 1.. 5) of the integer;
Cls: array [1.. NutNum, 1.. 6] of extended;

Procedure TForm1. Button2Click (Sender: TObject);
Var
Fs: TFileStream;
I, j: Integer;
S: a string;
The begin
Fs:=TFileStream. Create (' c: \ NuCoef. Data, fmOpenRead);
Try
Fs. Read (Nals, Sizeof (Nals));
Fs. Read (Cls, Sizeof (Cls));

Memo1. The Clear;
For I:=1 to NutNum do
The begin
S:=';
For j:=1 to 5 do
S:=s + '+ IntToStr (Nals [I, j]);

Memo1. Lines. The Add (s);
end;

For I:=1 to NutNum do
The begin
S:=';
For j:=1 to 6 do
S:=s + '+ FloatToStr (Cls [I, j]);

Memo1. Lines. The Add (s);
end;
The finally
Fs. Free;
end;
end;
  • Related