The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

Adding things to an array automatically? by toysbfun 2008-06-08 10:51:27
(I can't search for how to do it because I know so little terminology. All I can do is describe it)

I have the algorithm n=n*2. I want to make it loop until n=1000 and put each result in an array [2, 4, 8, 16, etc]. However most basic tutorials I've found say to put each result into the array manually, something I'd like to avoid. Could someone give me a sample (in any language) to adapt or at least tell me what I'm trying to do is called?
[ Reply ]
  How about list comprehension? by Concept2008-06-08 10:59:32
  Stick the array in the object by oot2008-06-08 11:04:33

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)