viVSScanf
Purpose
Reads, converts, and formats data from a user-specified buffer using the format specifier. Stores the formatted data in the parameters designated by params.
C Syntax
ViStatus viVSScanf(ViSession vi, ViBuf buf, ViString readFmt, ViVAList params)
Visual Basic Syntax
viVSScanf&(ByVal vi&, ByVal buf$, ByVal readFmt$, params as Any)
Resource Classes
GPIB INSTR, GPIB INTFC, GPIB-VXI INSTR, Serial INSTR, TCPIP INSTR, TCPIP SOCKET, USB INSTR, USB RAW, VXI INSTR, VXI SERVANT
Parameters
Name | Direction | Description |
---|---|---|
vi |
IN |
Unique logical identifier to a session. |
buf |
IN |
Buffer from which data is read and formatted. |
readFmt |
IN |
String describing the format to apply to params. |
params |
OUT |
A list with the variable number of parameters into which the data is read and the format string is applied. |
Return Values
Completion Codes | Description |
---|---|
VI_SUCCESS |
Data was successfully read and formatted into params parameter(s). |
Error Codes | Description |
---|---|
VI_ERROR_INV_OBJECT |
The given session reference is invalid. |
VI_ERROR_RSRC_LOCKED |
Specified operation could not be performed because the resource identified by vi has been locked for this kind of access. |
VI_ERROR_INV_FMT |
A format specifier in the readFmt string is invalid. |
VI_ERROR_NSUP_FMT |
A format specifier in the readFmt string is not supported. |
VI_ERROR_ALLOC |
The system could not allocate a formatted I/O buffer because of insufficient resources. |
Description
The viVSScanf() operation is similar to viVScanf(), except that the data is read from a user-specified buffer rather than a device.
Note Because the prototype for this function cannot provide complete type checking, remember that all output parameters must be passed by reference. |
Related Topics