This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.
Old posts that have not been replied to for several years.
-
darkie
- Voice
- Posts: 20
- Joined: Sun Feb 23, 2003 4:50 am
Post
by darkie »
How can I extract the ASCII code for a single character?
ie. The ascii code of 9 is 57.
Any help on this will be appreciated.
-
darkie
- Voice
- Posts: 20
- Joined: Sun Feb 23, 2003 4:50 am
Post
by darkie »
Never mind, I got it. It spits it out in hex, but it works:
Code: Select all
set s "h"
binary scan $s H*@0a* hex ascii
puts "Hex: $hex"
-
user
-
- Posts: 1452
- Joined: Tue Mar 18, 2003 9:58 pm
- Location: Norway
Post
by user »
Have you ever read "The Manual"?
-
darkie
- Voice
- Posts: 20
- Joined: Sun Feb 23, 2003 4:50 am
Post
by darkie »
Thanks, that works even better!