ASCII to int

2011-10-10 Thread Tom Gao
Hi All, Does anyone know how to convert a string of ASCII characters to int? Eg abcd to some form of int. I need to do a bunch of calculations on strings the only way is if they're in int not sure if anyone know of a good way to do this. Thanks, Tom

Re: ASCII to int

2011-10-10 Thread David Rhys Jones
, ** ** Does anyone know how to convert a string of ASCII characters to int? Eg “abcd” to some form of int. ** ** I need to do a bunch of calculations on strings the only way is if they’re in int not sure if anyone know of a good way to do this. ** ** Thanks, Tom

RE: ASCII to int

2011-10-10 Thread Tom Gao
Very nice. Thank you Any suggestion on how I can convert it back to string? From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of David Rhys Jones Sent: Tuesday, 11 October 2011 1:05 AM To: ozDotNet Subject: Re: ASCII to int int total

Re: ASCII to int

2011-10-10 Thread noonie
convert it back to string? ** ** ** ** *From:* ozdotnet-boun...@ozdotnet.com [mailto: ozdotnet-boun...@ozdotnet.com] *On Behalf Of *David Rhys Jones *Sent:* Tuesday, 11 October 2011 1:05 AM *To:* ozDotNet *Subject:* Re: ASCII to int ** ** int total = 0

RE: ASCII to int

2011-10-10 Thread David Kean
Can I ask what's the scenario? From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Tom Gao Sent: Monday, October 10, 2011 1:36 PM To: 'ozDotNet' Subject: RE: ASCII to int Very nice. Thank you Any suggestion on how I can convert it back to string? From

RE: ASCII to int

2011-10-10 Thread Tom Gao
sorry there's no real world scenario for this. I'm trying to replicate some calculation purely for academic reasons. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of David Kean Sent: Tuesday, 11 October 2011 7:42 AM To: ozDotNet Subject: RE: ASCII to int

Re: ASCII to int

2011-10-10 Thread noonie
to int ** ** Can I ask what’s the scenario? ** ** *From:* ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Tom Gao *Sent:* Monday, October 10, 2011 1:36 PM *To:* 'ozDotNet' *Subject:* RE: ASCII to int ** ** Very nice. Thank you

Re: ASCII to int

2011-10-10 Thread djones147
...@ozdotnet.com Date: Tue, 11 Oct 2011 08:12:54 To: ozDotNetozdotnet@ozdotnet.com Reply-To: ozDotNet ozdotnet@ozdotnet.com Subject: Re: ASCII to int Tom, Using David's method will turn a string to an int. But there are two problems. 1. If the string is very long then it will overflow int. 2. You can't

RE: ASCII to int

2011-10-10 Thread Tom Gao
, 11 October 2011 8:13 AM To: ozDotNet Subject: Re: ASCII to int Tom, Using David's method will turn a string to an int. But there are two problems. 1. If the string is very long then it will overflow int. 2. You can't turn it back to the same string you started with. -- noonie

RE: ASCII to int

2011-10-10 Thread Greg Keogh
Tom, if you want to convert a string of ASCII chars into a number and do the inverse process, then the informational content of both is the same, only the representation changes. Are you hoping that the manipulation of one representation is more convenient to manipulate than the other in some way?