File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Ascii to Decimal - Eating my Brain. Urgent please Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Ascii to Decimal - Eating my Brain. Urgent please" Watch "Ascii to Decimal - Eating my Brain. Urgent please" New topic
Author

Ascii to Decimal - Eating my Brain. Urgent please

Rajesh Kumar
Greenhorn

Joined: Nov 16, 2001
Posts: 28
Dear Friends
I am facing pblm while converting ascii to dec.
at present my program is supporting to this..
ascii dec
a 61
but, when i give "aa" it is still saying 61 as decimal.
how can i make my program to get this type of result
aa 6161
aaa 616161
is it possible.
please help me.
Thanks in advance
Yours
Rajesh
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4442
    
    5

Based on the information you have given, you are doing two things wrong:
1. ASCII('a') is 97, not 61
2. You don't have a loop to process each character in a string
Post some code and we'll tell you exactly where you're doing it wrong (and don't forget to use the little Instant UBB Code "Code" button below the "Add Reply" button when you reply)


Junilu - [How to Ask Questions] [How to Answer Questions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ascii to Decimal - Eating my Brain. Urgent please
 
Similar Threads
Correctly specified Identifiers
how many differnt ways can you initialize char ....
Get Ascii value for a Char
Struts Form issue
Get Ascii value for a Char