Setup Example

image\head10.gif VB.NET

Dim Ret As Integer

Dim Str As String

Dim FltData As Single

 

Str = "DV +0.123E-3"

FltData = 0

Ret = GpCnvStrToFlt(Str, FltData)

 

(Result)

FltData : 0.000123

 

image\head10.gif C

DWORD Ret;

char Str[256];

float FltData;

 

lstrcpy(Str, "DV +0.123E-3");

FltData = 0;

Ret = GpCnvStrToFlt(Str, &FltData);

 

(Result)

FltData : 0.000123

 

image\head10.gif C#

uint Ret;

string Str;

float FltData;

 

Str = "DV +0.123E-3";

FltData = 0;

Ret = gpib.CnvStrToFlt(Str, out FltData);

 

(Result)

FltData : 0.000123

 

image\head10.gif Python

Ret = ctypes.c_ulong()

Str = ctypes.create_string_buffer(256)

FltData = ctypes.c_float()

 

Str.value = b"DV +0.123E-3"

FltData.value = 0

Ret.value = GpibPy.GpCnvStrToFlt(Str, ctypes.byref(FltData))

 

(Result)

FltData : 0.000123