forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Strange Results on code

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Jul 26, 2003 8:07 pm    Post subject: Strange Results on code Reply with quote

Sometimes this returns that "a" is an alphabetic character and sometimes
it says it isn't. Confused

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
View user's profile Send private message Visit poster's website
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Sun Jul 27, 2003 12:22 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group