VB.NET
Dim ArraySize, i, Ret As Integer
Dim Str As String
Dim DblData(100) As Double
Str = "DV +0.123E-3, DV -0.456E-3"
For i = 0 to 99
DblData(i) = 0
Next
ArraySize = 100
Ret = GpCnvStrToDblArray(Str, DblData, ArraySize)
(Result)
DblData[0] : 0.000123
DblData[1] : -0.000456
ArraySize : 2
C
DWORD ArraySize, i, Ret;
char Str[256];
double DblData[100];
lstrcpy(Str, "DV +0.123E-3, DV -0.456E-3");
for(i = 0; i < 100; i++) {
DblData[i] = 0;
}
ArraySize = 100;
Ret = GpCnvStrToDblArray(Str, DblData, &ArraySize);
(Result)
DblData[0] : 0.000123
DblData[1] : -0.000456
ArraySize : 2
C#
uint ArraySize, i, Ret;
string Str;
double[] DblData = new double[100];
Str = "DV +0.123E-3, DV -0.456E-3";
for(i = 0; i < 100; i++) {
DblData[i] = 0;
}
ArraySize = 100;
Ret = gpib.CnvStrToDblArray(Str, DblData, out ArraySize);
(Result)
DblData[0] : 0.000123
DblData[1] : -0.000456
ArraySize : 2
Python
ArraySize, Ret = ctypes.c_ulong(), ctypes.c_ulong()
Str = ctypes.create_string_buffer(256)
DblData = (ctypes.c_double * 100)()
Str.value = b"DV +0.123E-3, DV -0.456E-3"
for i in range(0, 100):
DblData[i] = 0
ArraySize.value = 100
Ret.value = GpibPy.GpCnvStrToDblArray(Str, DblData, ctypes.byref(ArraySize))
(Result)
DblData[0] : 0.000123
DblData[1] : -0.000456
ArraySize : 2