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