GpCnvStrToFlt

image\BLTLRGSQ.gifBoards that Support the Function image\SETUP.gif image\SANBTN.gif

 

 

image\head10.gif Operation             ASCII characters given to it is changed into the Float value (In VB, Single value).

 

image\head10.gif Format                 

(VB.NET)

Dim Ret As Integer

Dim Str As String

Dim FltData As Single

Ret = GpCnvStrToFlt(Str, FltData)

 

(C)

DWORD Ret;

char *Str;

float FltData;

Ret = GpCnvStrToFlt(Str, &FltData);

 

(C#)

uint Ret;

string Str

float FltData;

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

 

(Python)

Ret = ctypes.c_ulong()

Str = ctypes.create_string_buffer(xxxx) # (xxxx is the string length)

FltData = ctypes.c_float()

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

 

image\head10.gif Mode                   Master mode / Slave mode

 

image\head10.gif Parameters

Str         :   A string to change.

Characters to change into the Float value (In VB, Single value) is specified.
There is no problem even if a header is contained in this characters.
And, a capital letter, small letter is judged as the same one character.

 

FltData   :   Changed Float value (In VB, Single value, return value)

 

Ret        :   Return value

0     : Normal completion

255  : Illegal call

(See "Return Values" for details.)

 

image\head10.gif Notes

1 This function does a change on the following condition.

When there is [<Header>+<The characters which shows numerical value>] or [< The characters which shows numerical value>]

 

*Refer to the complement of GpCnvStrToDbl() for the details of the condition that it faces in the data block.

 

2 This function can be used even if it doesn't call GpIni().

 

3 The condition of 1. is applicable when it is removed when a header and so on is set up by the GpCnvSettings function.