STATISTICA







Using STADEV with Visual Basic (32 Bit)
Modifying an existing file

This example adds a variable to an existing data file, fills it with some numbers, and then adds two value labels.

Note that to use STADEV from 32 bit Visual Basic, you must create a module containing STATISTICA Development Environment VB header file (sd_vb32.inc); call the desired functions, and put stadev32.dll on the path or in VB directory (so it is visible for VB run time).


Private Sub example3(fname$)
H = StaOpenFile(fname$)
If H = 0 Then Exit Sub
'add variable number 5:
res = StaAddVars(H, 4, 1)
'set new variable name:
res = StaSetVarName(H, 5, "BHPH")
'insert some values:
NC = StaGetNCases(H)
For i = 1 To NC
   res = StaSetData(H, 5, i, i * 10)
Next i
'add text labels:
res = StaAddLabel(H, 5, 10, "A", "long label for A")
res = StaAddLabel(H, 5, 20, "B", "long label for B")
'close the file handle:
StaCloseFile (H)
Debug.Print "finished"
End Sub
Back to List of Programs



[StatSoft]
2300 East 14th Street, Tulsa, OK 74104
Phone: (918) 749-1119; Fax: (918) 749-2217

[StatSoft]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.