VB.NET
Dim StrSize, Ret As Integer
Dim Str As New String("", 256)
Dim FltData As Single
StrSize = 256
FltData = 0.000123
Ret = GpCnvFltToStr(Str, StrSize, FltData)
(Result)
Str : "+0.12300E-003"
StrSize : 11
C
DWORD StrSize, Ret;
char Str[256];
float FltData;
StrSize = sizeof(Str);
FltData = 0.000123;
Ret = GpCnvFltToStr(Str, &StrSize, FltData);
(Result)
Str : "+0.12300E-003"
StrSize : 11
C#
uint StrSize, Ret;
StringBuilder Str = new StringBuilder(256);
float FltData;
StrSize = sizeof(Str);
FltData = 0.000123;
Ret = gpib.CnvFltToStr(Str, out StrSize, FltData);
(Result)
Str : "+0.12300E-003"
StrSize : 11
Python
StrSize, Ret = ctypes.c_ulong(), ctypes.c_ulong()
Str = ctypes.create_string_buffer(256)
FltData ctypes.c_float()
StrSize.value = len(Str)
FltData.value = 0.000123
Ret.value = GpibPy.GpCnvFltToStr(Str, ctypes.byref(StrSize), FltData)
(Result)
Str : "+0.12300E-003"
StrSize : 11