VB.NET
Dim StrSize, ArraySize, Ret As Integer
Dim Str As New String("", 256)
Dim DblData(100) As Double
StrSize = 256
DblData(0) = 0.000123
DblData(1) = -0.000456
ArraySize = 2
Ret = GpCnvDblArrayToStr(Str, StrSize, DblData, ArraySize)
(Result)
Str : "+0.12300E-003,-0.45600E-003"
StrSize : 23
C
DWORD StrSize, ArraySize, Ret;
char Str[256];
double DblData[100];
StrSize = sizeof(Str);
DblData[0] = 0.000123;
DblData[1] = -0.000456;
ArraySize = 2;
Ret = GpCnvDblArrayToStr(Str, &StrSize, DblData, ArraySize);
(Result)
Str : "+0.12300E-003,-0.45600E-003"
StrSize : 23
C#
uint StrSize, ArraySize, Ret;
StringBuilder Str = new StringBuilder(256);
double[] DblData = new double[100];
StrSize = 256;
DblData[0] = 0.000123;
DblData[1] = -0.000456;
ArraySize = 2;
Ret = gpib.CnvDblArrayToStr(Str, out StrSize, DblData, ArraySize);
(Result)
Str : "+0.12300E-003,-0.45600E-003"
StrSize : 23
Python
StrSize, ArraySize, Ret = ctypes.c_ulong(), ctypes.c_ulong(), ctypes.c_ulong()
Str = ctypes.create_string_buffer(256)
DblData = (ctypes.c_double * 100)()
StrSize.value = len(Str)
DblData[0] = 0.000123
DblData[1] = -0.000456
ArraySize.value = 2
Ret.value = GpibPy.GpCnvDblArrayToStr(Str, ctypes.byref(StrSize), DblData, ArraySize)
(Result)
Str : "+0.12300E-003,-0.45600E-003"
StrSize : 23