Contents
LabWindows/CVI Standard Libraries vi © National Instruments Corporation
GetFmtErrNdx..................................................................................................2-18
GetFmtIOError.................................................................................................2-18
GetFmtIOErrorString.......................................................................................2-19
NumFmtdBytes................................................................................................2-20
OpenFile...........................................................................................................2-20
ReadFile ...........................................................................................................2-22
ReadLine.......................................................................................................... 2-23
Scan..................................................................................................................2-24
ScanFile............................................................................................................2-25
ScanIn...............................................................................................................2-25
SetFilePtr..........................................................................................................2-26
StringLength.....................................................................................................2-28
StringLowerCase..............................................................................................2-28
StringUpperCase.............................................................................................. 2-29
WriteFile...........................................................................................................2-29
WriteLine .........................................................................................................2-30
Using the Formatting and Scanning Functions............................................................2-31
Introductory Formatting and Scanning Examples............................................2-31
Formatting Functions.......................................................................................2-32
Formatting Functions—Format String.................................................2-33
Formatting Modifiers........................................................................... 2-35
Formatting Integer Modifiers (%i, %d, %x, %o, %c)..............2-35
Formatting Floating-Point Modifiers (%f)...............................2-37
Formatting String Modifiers (%s)............................................2-38
Fmt, FmtFile, FmtOut—Asterisks (*) Instead of Constants
in Format Specifiers.............................................................................2-39
Fmt, FmtFile, FmtOut—Literals in the Format String.........................2-40
Scanning Functions..........................................................................................2-40
Scanning Functions—Format String....................................................2-41
Scanning Modifiers..............................................................................2-43
Scanning Integer Modifiers (%i, %d, %x, %o, %c).................2-43
Scanning Floating-Point Modifiers (%f)..................................2-45
Scanning String Modifiers (%s)...............................................2-46
Scan, ScanFile, ScanIn—Asterisks (*) Instead of Constants
in Format Specifiers.............................................................................2-48
Scan, ScanFile, ScanIn—Literals in the Format String .......................2-48
Formatting and I/O Library Programming Examples..................................................2-49
Fmt/FmtFile/FmtOut Examples in C ...............................................................2-50
Integer to String....................................................................................2-50
Long Integer to String..........................................................................2-51
Real to String in Floating-Point Notation............................................ 2-51
Real to String in Scientific Notation....................................................2-52
Integer and Real to String with Literals...............................................2-53
Two Integers to ASCII File with Error Checking................................2-53
Real Array to ASCII File in Columns and with Comma Separators ...2-53