| View previous topic :: View next topic |
| Author |
Message |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Jul 26, 2003 8:07 pm Post subject: Strange Results on code |
|
|
Sometimes this returns that "a" is an alphabetic character and sometimes
it says it isn't.
| Code: | %C = "a"
LOADLIB user32.dll
%a = @lib(user32,IsCharAlphaA,BOOL:,%C)
if @not(@zero(%a))
info @chr(34)%C@chr(34) is an alphabetic character
else
warn @chr(34)%C@chr(34) is not an alphabetic character
end
FREELIB user32.dll |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Sun Jul 27, 2003 12:22 am Post subject: |
|
|
I'm just kind of guessing here either, but I'd say it's caused by the parameter not
being of "char" type, but rather of the "TCHAR" type.
| Win32 API Helpfile wrote: |
TCHAR is a data type that is a character string on either a Unicode or an ANSI or DBCS platform. For Unicode platforms, this string is defined as having the WCHAR type. For ANSI and DBCS platforms, the string is defined as having the char type.
Syntax
typedef char TCHAR;
typedef WCHAR TCHAR;
Comments
Your application can use TCHAR to represent a string of either the WCHAR or char type. Be sure to define the symbolic constant UNICODE and limit the platform where necessary. MAPI will interpret the platform information and internally translate TCHAR to the appropriate string.
|
| Win32 API Helpfile wrote: |
WCHAR is a data type that is a Unicode character string.
Syntax
typedef WORD WCHAR;
|
So it seems that the type is operating system dependent. From the information quoted
above it can be concluded that a 1 byte value is expected on non-Unicode platforms and a
Word value (2 byte) on Unicode platforms.
For now I'm not certain how to solve this so that it would work on both platforms. |
|
| Back to top |
|
 |
|