Re: a problem in my program in pascal
- From: Dodgy <Dodgy@xxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 11 Oct 2006 15:55:42 +0100
On 11 Oct 2006 05:23:53 -0700, gilevgi@xxxxxxxxx waffled on about
something:
I want to write the pattern " for i:=1 to a[i] do" n times (n is
variable), that is,
for b[1]:=1 to a[1] do
for b[2]:=1 to a[2] do
for b[3]:=1 to a[3] do
for b[4]:=1 to a[4] do
.........
..........
.........
for b[n]:=1 to a[n] do
something here.
in this writing n is a variable. therefore I can not write what i want.
can you say how can i write the above structure using "repeat-until" or
"while" patterns?
thanks in advance.
Never before has half a dozen lines of code instilled such a sense of
terror in me!
Even if a[1],a[2]...etc etc only contain the value 100, your loop
could be going for days!
Iteration=Max a[] element value ^ n
What are you actually trying to do? (Please step back and describe the
broader function of you code).
Dodgy.
--
MUSHROOMS ARE THE OPIATE OF THE MOOSES
.
- References:
- a problem in my program in pascal
- From: gilevgi
- a problem in my program in pascal
- Prev by Date: Re: Interface Question
- Next by Date: Re: a problem in my program in pascal
- Previous by thread: a problem in my program in pascal
- Next by thread: Re: a problem in my program in pascal
- Index(es):
Relevant Pages
|