Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Sscanf()?

May
12,930
170
With swscanf() I can take apart a datetime using this format string.

Code:
L"%4hu%2hu%2hu%2hu%2hu%2hu"
Can it be done with Sscanf()? If so, what should the format string be?

Thanks.
 
With swscanf() I can take apart a datetime using this format string.

Code:
L"%4hu%2hu%2hu%2hu%2hu%2hu"
Can it be done with Sscanf()? If so, what should the format string be?

Thanks.

Yes, and the same.

Though I've also told you (several times!) that I do *not* recommend using Sscanf() and Ssprintf(), as they have a number of internal variations specifically for TCC. (And I will not modify them for any perceived incompatibility with the RTL functions.)
 
On Mon, 31 May 2010 22:06:59 -0400, rconn <> wrote:

|---Quote (Originally by vefatica)---
|With swscanf() I can take apart a datetime using this format string.
|
|
|Code:
|---------
|L"%4hu%2hu%2hu%2hu%2hu%2hu"
|---------
|Can it be done with Sscanf()? If so, what should the format string be?
|
|Thanks.
|---End Quote---
|
|Yes, and the same.
|
|Though I've also told you (several times!) that I do *not* recommend using Sscanf() and Ssprintf(), as they have a number of internal variations specifically for TCC. (And I will not modify them for any perceived incompatibility with the RTL functions.)

Tests show that "%2h" and "%2u" work and that "%2hu" doesn't. If I'm filling
WORDs I suppose I should be using "%2h" ... right?

I am not suggesting you change it. It's just fine as it is. I just use it so
seldom that I must re-discover its peculiarities.
--
- Vince
 
Back
Top