Note that to use STADEV from C/C++ you must include the Development Environment include file ( #include "stadev.h" ) into the source file where you will call the library functions; call the desired functions,and link stadev.dll (for 16-bit programs) or stadev32.dll (for 32-bit programs) to your program.
HSTAFILE handle = StaCreateFile (10, 10, "c:\\stat\\files\\newdata.sta");
if ( handle == 0 ) {
MessageBox (NULL, "Cannot create STATISTICA file !!!", "Error", MB_OK);
return;
}
// change names of 3 first variables:
StaSetVarName (handle, 1, "ABC");
StaSetVarName (handle, 2, "MIDDLE");
StaSetVarName (handle, 3, "XYZ");
// fill the file with random numbers:
srand( (unsigned)time( NULL ) );
for ( short i=1; i <= 10; i++ )
for ( long j=1; j <= 10; j++ )
StaSetData (handle, i, j, rand());
StaCloseFile (handle);
| 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.