02-07-2011 01:57 PM
Hi,
I am trying to understand the usage of the Scan() function which is a CVI function defined in formatio.h. The usage I am looking at is as follows:
Scan (READING, "%32i[zb1u]>%32i", &VALS_READ);
READING is char[100]
VALS_READ is unsigned int[50]
I am mainly confused about how the format specification works (like what is the meaning of [zb1u]? What is the format specifier's equivalent in using the sscanf() function in C?
Thank you!
02-07-2011 03:11 PM
Scan modifiers are very well described in the online help: I suggest you to study it carefully as this command has several facilities that can help you a lot.
Regarding your example, probably the closest equivalent in standard C language is:
for (i = 0; i < 32; i++) VALS_READ[i] = READING[i]