NO

Author Topic: using tchar.h  (Read 4565 times)

Claudy

  • Guest
using tchar.h
« on: July 14, 2007, 08:21:04 PM »
hi,
I am new in Pelles C, so...
Trying to use _wcstof() , but it seams it is not there.
Trying to get a float fromout a string.
In embeddeb visual, I had to convert the string first, and then used the standard strtof().
Are there missing some functions...?

Claudy     Belgium

JohnF

  • Guest
Re: using tchar.h
« Reply #1 on: July 14, 2007, 09:15:46 PM »
Try wchar.h

wcstof

John

Claudy

  • Guest
Re: using tchar.h
« Reply #2 on: July 15, 2007, 12:36:32 PM »
John,

OK... I did it already, but the thing I was asking me is: are the published functions not operational for the moment,
because we rely on it, otherwise we have to program the oldfashion way. If there is not any more a standard or some portebility for C,
I have to choose a developersystem and stay with it for the rest of my life...
Pelles C is till now, the smootest developer envirement that I try for both: mobile and desktop, you start it, and you program fast...fast...fast, programming mobile is a lightning, speaking for C developing, no Microsoft or any thing else can compete with it.
Also the developer envirement is very logical and fast: as a beginner, you see what you have to set and do...
Keep this superbe work, but do clearly mention what is not working for the moment, otherwise, a beginner will let it down...
Very...Very...Very...Very... good work, keep going, I try it for a while, and if it satisfy me completely, I will be for shure a big donator...

Claudy       Belgium

JohnF

  • Guest
Re: using tchar.h
« Reply #3 on: July 15, 2007, 12:58:01 PM »
If you look in wchar.h you will see that wcstof is not available in WINCE

#ifndef _WINCE
float __cdecl wcstof(const wchar_t * restrict, wchar_t ** restrict);
long double __cdecl wcstold(const wchar_t * restrict, wchar_t ** restrict);
etc, etc.
#endif /* _WINCE */

I don't know why, maybe someone else knows.

John


Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: using tchar.h
« Reply #4 on: July 15, 2007, 01:04:07 PM »
The Setup says:
Quote
To save memory on Pocket PC, the Microsoft C runtime (in ROM) is used.

Even though the available memory is increaing for small devices, I still think it's a good idea to save memory. A few extra C runtime functions are available in Pelles C (on Pocket PC/Smartphones), but I don't want to port the entire C runtime. This means you can (basically) only use what Microsoft offers... (hence the #ifndef _WINCE etc.)
/Pelle

Claudy

  • Guest
Re: using tchar.h
« Reply #5 on: July 15, 2007, 01:49:20 PM »
Pelle,

Thanks Pelle, I understand now... Can we get any where a fast list to see what is realy available for C in Windows mobile platforms..?
If you say yes, I will search for myself...
Thanks a lot for the reply, I try to use standard functions as much as possible...

Claudy      Belgium

Claudy

  • Guest
Re: using tchar.h
« Reply #6 on: July 15, 2007, 01:54:41 PM »
John,

Sorry, I almost forgot to mention you to, your answer did the job, and Pelles 's to...

Claudy      Belgium

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: using tchar.h
« Reply #7 on: July 15, 2007, 10:28:06 PM »
Claudy, try MSDN Online - I think there is a Windows CE section somewhere... (I don't have a link, sorry)
/Pelle