Re: A simple program to display numbers counting up
From: CBFalconer (cbfalconer_at_yahoo.com)
Date: 03/27/04
- Previous message: Nick Landsberg: "Re: PROGRAMMING HOMEWORK HELP!"
- In reply to: Jim B: "Re: A simple program to display numbers counting up"
- Next in thread: Alf P. Steinbach: "Re: A simple program to display numbers counting up"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 27 Mar 2004 14:27:00 GMT
*** top-posting fixed ***
Jim B wrote:
> mensanator@aol.com (mensanator) wrote in message
>> jjbrailey@yahoo.co.uk (Jim B) wrote in message
>>>
>>> I have no programming experience or tools, however my 6 year
>>> old son would like to watch the computer "count up" to see how
>>> high a number it can get to!
>>>
>>> What is the best way to achieve this such that he can see the
>>> numbers count upwards (i.e. slow enough that he can see 1, 2,
>>> 3, 4, etc)?
>>
>> Shall I assume you at least are using Windows?
>>
>> Open Notepad and type in the following three lines:
>>
>> @echo off
>> cls
>> for /L %%i in (1,1,%1) do for /L %%j in (1,1,%2) do if %%j==%2 echo %%i
>>
>> Save the file as count.bat in the My Documents folder.
>>
>> Start a command prompt. If your prompt isn't the My Documents
>> folder, go there and type:
>>
>> count 100 10000
>>
>> to see numbers count from 1 to 100. The first number after count
>> is how high to count and the second is the speed at which it
>> counts. If it's counting too fast for your son to watch, enter a
>> bigger number. If you get ridiculous and do something like
>>
>> count 1000000 100000
>>
>> you can interupt it by typing ctrl-C and when prompted
>>
>> Terminate batch job (Y/N)?
>>
>> type Y to stop it.
>
> Hi Thanks for that.. It works fine on my PC at work (Win2000), but
> every time I try to run it at home (Win98) I get Syntax Error.
>
> Thanks for your help so far, any idea's on this?
The /L option is not valid on Microsofts brain dead COMMAND.COM
for W98. If you replace that with 4dos it will work.
Please do not toppost. Your answer goes after (or intermixed
with) the material to which you are replying.
-- Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net) Available for consulting/temporary embedded and systems. <http://cbfalconer.home.att.net> USE worldnet address!
- Previous message: Nick Landsberg: "Re: PROGRAMMING HOMEWORK HELP!"
- In reply to: Jim B: "Re: A simple program to display numbers counting up"
- Next in thread: Alf P. Steinbach: "Re: A simple program to display numbers counting up"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|