On 31 Oct 2008, at 13:13, Debbie Carne wrote:
> I don't like the fact that it puts a comma even on the last iteration.
What you could do is instead of printing them, whack them into an array:
numbers << x
Then, when you hit your count and it's time to print them out like so:
numbers.join(", ")
This will do what you want.
Obviously if you're going to infinity, you'd never print it out, but
then there would never be a "last number" so you could do it the way
you do now.
--
Paul Robinson
http://vagueware.com :: [EMAIL PROTECTED] :: +44 (0) 7740 465746
Vagueware Limited is registered in England/Wales, number 05700421
Registered Office: 3 Tivoli Place, Ilkley, W. Yorkshire, LS29 8SU
Correspondence: 55 Velvet Court, Granby Row, Manchester, M1 7AB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"NWRUG" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/nwrug-members?hl=en
-~----------~----~----~----~------~----~------~--~---