Re: Converting from string to integer
- To: mathgroup at smc.vnet.net
- Subject: [mg56405] Re: Converting from string to integer
- From: Peter Pein <petsie at arcor.de>
- Date: Sun, 24 Apr 2005 03:28:55 -0400 (EDT)
- References: <d4clnt$33b$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Magnus wrote: > Hey folks, > > I have strings consisting of numbers. Now; how do I make them all of integer > type? > > Ex: > "0123" ---> 123 > > Thanks, > > Magnus, > Norway > > Each of the following lines leaves you with an integer: ToExpression["0123"] ToExpression["0.123"]//Round ToExpression["12.3I"]//Abs//Round -- Peter Pein Berlin