msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Chr function question (case sensitivity)

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Enterprise
Author Message
Anonymous



Joined: 04 Oct 2007
Posts: 20

PostPosted: Wed Oct 10, 2007 6:02 pm    Post subject: Chr function question (case sensitivity) Reply with quote

I am using the Chr function and it seems to be conversing every ascii
representation to its upper case equivalent character.

Is there a way to preserve casing using the Chr function - or is there
an equivalent function that converts integer to string whilst preserving
case - OR should I roll (i.e. write) my own ?

Archived from group: microsoft>public>vb>enterprise
Back to top
View user's profile Send private message
Bob Butler



Joined: 04 Oct 2007
Posts: 1081

PostPosted: Wed Oct 10, 2007 10:26 am    Post subject: Re: Chr function question (case sensitivity) Reply with quote

"Anonymous" wrote in message @bt.com...
>I am using the Chr function and it seems to be conversing every ascii
>representation to its upper case equivalent character.
>
> Is there a way to preserve casing using the Chr function - or is there an
> equivalent function that converts integer to string whilst preserving
> case - OR should I roll (i.e. write) my own ?


?chr$(65) & Chr$(97)
Aa

If that's not what you are getting then you need to post code or more fully
explain what you are doing. Chr returns lower case when you provide it with
the ascii value for a lower case letter.
Back to top
View user's profile Send private message
Anonymous



Joined: 04 Oct 2007
Posts: 20

PostPosted: Wed Oct 10, 2007 6:30 pm    Post subject: Re: Chr function question (case sensitivity) Reply with quote

Bob Butler wrote:

> "Anonymous" wrote in message
> @bt.com...
>
>> I am using the Chr function and it seems to be conversing every ascii
>> representation to its upper case equivalent character.
>>
>> Is there a way to preserve casing using the Chr function - or is there
>> an equivalent function that converts integer to string whilst
>> preserving case - OR should I roll (i.e. write) my own ?
>
>
>
> ?chr$(65) & Chr$(97)
> Aa
>
> If that's not what you are getting then you need to post code or more
> fully explain what you are doing. Chr returns lower case when you
> provide it with the ascii value for a lower case letter.
>
>

Thanks - was using Chr instead of Chr$ (all these little nuances -
reminds me of Perl *shudder*)
Back to top
View user's profile Send private message
Bob Butler



Joined: 04 Oct 2007
Posts: 1081

PostPosted: Wed Oct 10, 2007 10:53 am    Post subject: Re: Chr function question (case sensitivity) Reply with quote

"Anonymous" wrote in message @bt.com...
>
>
> Bob Butler wrote:
>
>> "Anonymous" wrote in message
>> @bt.com...
>>
>>> I am using the Chr function and it seems to be conversing every ascii
>>> representation to its upper case equivalent character.
>>>
>>> Is there a way to preserve casing using the Chr function - or is there
>>> an equivalent function that converts integer to string whilst preserving
>>> case - OR should I roll (i.e. write) my own ?
>>
>>
>>
>> ?chr$(65) & Chr$(97)
>> Aa
>>
>> If that's not what you are getting then you need to post code or more
>> fully explain what you are doing. Chr returns lower case when you
>> provide it with the ascii value for a lower case letter.
>>
>>
>
> Thanks - was using Chr instead of Chr$ (all these little nuances -
> reminds me of Perl *shudder*)

That's not the issue as Chr will return the same thing. The only difference
is that Chr returns a string wrapped in a variant while Chr$ returns the
string directly.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Enterprise 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


Powered by phpBB © 2001, 2005 phpBB Group