1. Newbie type question
- Posted by Jeff Grandy <wyrnfather at HOTMAIL.COM> Dec 03, 1998
- 364 views
Heya. I got a question, but i'm probably going to whap myself upside the head when I realize how simple the answer probaby is, but anyways... when in a for loop, how would you get the number to display? Ex: for i = 1 to 20 do puts(SCREEN, name) end for Now, assuming that 'name' has already been inputted above, how would you display i each time it loops? Thanks -- Jeff Grandy (grandyc at efni.com) ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com
2. Re: Newbie type question
- Posted by JJProg at CYBERBURY.NET Dec 03, 1998
- 354 views
EU>Heya. I got a question, but i'm probably going to whap myself upside the EU>head when I realize how simple the answer probaby is, but anyways... EU>when in a for loop, how would you get the number to display? Ex: EU>for i = 1 to 20 do EU> puts(SCREEN, name) EU>end for EU>Now, assuming that 'name' has already been inputted above, how would you EU>display i each time it loops? EU>Thanks EU> -- Jeff Grandy (grandyc at efni.com) EU>______________________________________________________ EU>Get Your Private, Free Email at http://www.hotmail.com Use printf. See the documentation in library.doc, but basically, it's: printf(SCREEN,"i = %d",{i}) You can put in lots of %(whatever) combinations so you could have a string and i so sequence strings integer i ... printf(SCREEN,"string #%d = %s",{i,strings[i]}) You can also put in other format stuff and library.doc explains all the possible combinations. Jeffrey Fielding JJProg at cyberbury.net http://members.tripod.com/~JJProg/
3. Re: Newbie type question
- Posted by Albert Brauneis <Dajawu36 at AOL.COM> Dec 03, 1998
- 365 views
In a message dated 12/3/98 10:27:22 PM !!!First Boot!!!, wyrnfather at HOTMAIL.COM writes: << for i = 1 to 20 do puts(SCREEN, name) end for >> Try This: sequence name name = "Albert" for i = 1 to 20 do printf(1, "%d:%s\n", {i, name}) end for Albert
4. Re: Newbie type question
- Posted by Lucius Hilley III <lhilley at CDC.NET> Dec 03, 1998
- 361 views
- Last edited Dec 04, 1998
Umm. for i = 1 to 10 do ? i end if --OR for i = 1 to 10 do print(1, i) puts(1, 10) end if -- :) "Your welcome to my 2 cents worth.", Lucius L. Hilley III _________________________ Lucius L. Hilley III lhilley at cdc.net http://www.cdc.net/~lhilley http://www.americanantiques.com http://www.dragonvet.com _________________________ On Thu, 3 Dec 1998 14:05:16 PST, Jeff Grandy <wyrnfather at HOTMAIL.COM> wrote: >Heya. I got a question, but i'm probably going to whap myself upside the >head when I realize how simple the answer probaby is, but anyways... >when in a for loop, how would you get the number to display? Ex: > >for i = 1 to 20 do > puts(SCREEN, name) >end for > >Now, assuming that 'name' has already been inputted above, how would you >display i each time it loops? > >Thanks > > -- Jeff Grandy (grandyc at efni.com) > >______________________________________________________ >Get Your Private, Free Email at http://www.hotmail.com
5. Re: Newbie type question
- Posted by Jeff Grandy <wyrnfather at HOTMAIL.COM> Dec 03, 1998
- 370 views
- Last edited Dec 04, 1998
><< for i = 1 to 20 do > puts(SCREEN, name) > end for >> > Whee! Thanks for the replies. I got it working now. Thanks again. -- Jeff Grandy (grandyc at efni.com) ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com