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 


HEX to ASCII

 
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: Fri Apr 18, 2003 6:48 pm    Post subject: HEX to ASCII Reply with quote

Why isn't there a function which can convert a hexidecimal number back to
ASCII in VDS? Or am I not seeing a function that does that. Confused

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri Apr 18, 2003 6:57 pm    Post subject: Reply with quote

There is...

Code:
%%asc = A
%%hex = @hex(@asc(%%asc))
%%con = @diff($%%hex,0)

info ASC: %%asc@cr()HEX: %%hex@cr()ASC: %%con


Just use the $.

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Apr 18, 2003 7:02 pm    Post subject: Reply with quote

Thanks... but I'm looking more at if I use @hex(hello) then I will get a
long combination. It can't be changed back to text with @asc() Confused

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri Apr 18, 2003 7:04 pm    Post subject: Reply with quote

You can only convert numbers from ASCII to HEX... Otherwise the answer will be FFFF8001...
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Apr 18, 2003 7:07 pm    Post subject: Reply with quote

Oops... Embarassed

I didn't know that. But how can that be? I mean, if you know how to convert
it to HEX you would know how to convert it back to ASCII. Smile

I was thinking of using it in an encryption routine I am working on.

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message 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