LabWindows/CVI Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
tstanley

Add a modifier to the format string for the various Fmt and Scan functions for making hex values upper case.

Status: Declined
These functions date back to a time (1988-1994) before CVI had a standard C library with printf/scanf functions. CVI has kept them around, for backwards compatibility reasons, but no new functionality is being added to them, so long as equivalent functionality exists in the stdio functions. Therefore, NI's standing recommendation is to use printf/scanf instead of Fmt/Scan.

Currently when formatting hex values into strings the letters a-f are always lowercase.  It would be nice to have an option to make them uppercase, as that is how most people are used to seeing them.  It would also allow for consistency between the way numeric controls work (which use uppercase A-F).

 

 

7 Comments
ngay528
Member

isn't %x for lowercase and %X for uppercase?

tstanley
Active Participant

That works for the C functions like scanf() and sprintf() but not the CVI functions like Scan() and Fmt().

ngay528
Member

Ah I see, Kudos

LuisG
NI Employee (retired)
Status changed to: Declined
These functions date back to a time (1988-1994) before CVI had a standard C library with printf/scanf functions. CVI has kept them around, for backwards compatibility reasons, but no new functionality is being added to them, so long as equivalent functionality exists in the stdio functions. Therefore, NI's standing recommendation is to use printf/scanf instead of Fmt/Scan.
Wolfgang
Trusted Enthusiast

Luis,

 

I can understand the argument. However, it would be nice if this statement would make it into the manual, too. Right now, the user does not know about NI's 'standing recommendation' not to use Fmt/Scan...

tstanley
Active Participant

I have to admit that I am a bit puzzled by this.  I use these functions all the time, and they were even a topic in the CVI training course I took a few years back.  Does NI consider other "duplicate" functions like FileOpen() to be depreciated, as FileOpen() is designed to be used with FmtFile()/ScanFile()?  Thanks.

LuisG
NI Employee (retired)

I probably should have been more careful with my terminology. The "standing recommendation" I was referring to is pretty informal, which is why it does not appear in any manual. We don't have any reason, at this time, to recommend to anyone that they not use them.

 

I definitely do not want to use terms like "deprecated" or "obsolete" in connection with these functions. You are free to continue using them as you are see fit. They are not going anywhere and they will continue working as they work today. They are duplicate, yes, but they are not deprecated.

 

Having said that, I can also state (also informally, as things might change in the future) that new functionality is probably not going to be added to these functions, as they have long ago been superseded by the ANSI C standard functions.

 

Luis