Note that to use STADEV from Delphi, you must include the stadev32 unit into your compilation: uses StaDev32, call the desired functions, and put stadev32.dll in your path and in the Delphi search path
procedure TestCreateFile;
const
CreateFileName = 'c:\stat\files\newdata.sta';
var
hSF: HSTAFILE;
i: smallint;
j: longint;
d: double;
begin
hSF := StaCreateFile(10, 10, CreateFileName);
if (0 = hSF) then
begin
writeln('Could not create STATISTICA file');
exit;
end;
{ change the names of the first three variables}
StaSetVarName(hSF, 1, 'ABC');
StaSetVarName(hSF, 2, 'MIDDLE');
StaSetVarName(hSF, 3, 'XYZ');
{ fill the file with random numbers}
Randomize;
for i := 1 to 10 do
for j := 1 to 10 do
begin
StaSetData(hSF, i, j, Random);
end;
StaCloseFile(hSF);
end;
| Back to List of Programs |
![[StatSoft]](../../../images/sssmall.gif)
2300 East 14th Street, Tulsa, OK 74104
Phone: (918) 749-1119; Fax: (918) 749-2217
e-mail: info@statsoft.com
©Copyright StatSoft, Inc., 1984-2004.
StatSoft, StatSoft logo, STATISTICA, SEWSS, SEDAS, Data Miner, SEPATH and GTrees are trademarks of StatSoft, Inc.