VB.NET
Dim StrSize, ArraySize, Ret As Integer
Dim Str As New String("", 256)
Dim FltData(100) As Single
StrSize = 256
FltData(0) = 0.000123
FltData(1) = -0.000456
ArraySize = 2
Ret = GpCnvFltArrayToStr(Str, StrSize, FltData, ArraySize)
(Result)
Str : "+0.12300E-003,-0.45600E-003"
StrSize : 23
C
DWORD StrSize, ArraySize, Ret;
char Str[256];
float FltData[100];
StrSize = lstrlen(Str);
FltData[0] = 0.000123;
FltData[1] = -0.000456;
ArraySize = 2;
Ret = GpCnvFltArrayToStr(Str, &StrSize, FltData, ArraySize);
(Result)
Str : "+0.12300E-003,-0.45600E-003"
StrSize : 23
C#
uint StrSize, ArraySize, Ret;
StringBuilder Str = new StringBuilder(256);
float[] FltData = new float[100];
StrSize = 256;
FltData[0] = 0.000123;
FltData[1] = -0.000456;
ArraySize = 2;
Ret = gpib.CnvFltArrayToStr(Str, out StrSize, FltData, 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)
FltData = (ctypes.c_float * 100)()
StrSize.value = len(Str)
FltData[0] = 0.000123
FltData[1] = -0.000456
ArraySize.value = 2
Ret.value = GpibPy.GpCnvFltArrayToStr(Str, ctypes.byref(StrSize), FltData, ArraySize)
(Result)
Str : "+0.12300E-003,-0.45600E-003"
StrSize : 23