From: Dana Merrick Date: 2008-08-26T09:35:52+09:00 Subject: Re: adding string and numbers --------------enig3566D46542DE963958A28B1F Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Adam Iggy wrote: > puts 'did you know there are '+name1.length+name2.length+name3.length+ = ' > letters in your name?' >=20 > the problem is i get the strings combined, not adding the seperate > numbers together. Try putting parentheses around the addition, like this: (name1.length+name2.length+name3.length).to_s -Dana --=20 Dana Merrick - System Administrator Integrated Computer Solutions, Inc. 54B Middlesex Tpke, Bedford, MA 01730 617.621.0060 x112 - http://www.ics.com --------------enig3566D46542DE963958A28B1F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (Darwin) iD8DBQFIs1Do7b+8UB5G/wMRAuiIAJ4kacJbVZepSRwaT2hGQmFts9Gz1QCaAxm6 NVEIm23IQJUm7rq6TjkweQc= =nRr2 -----END PGP SIGNATURE----- --------------enig3566D46542DE963958A28B1F--