comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Help with Nested FOR Loop
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Help with Nested FOR Loop [message #42038] Fri, 10 December 2004 16:10 Go to previous message
Y.T. is currently offline  Y.T.
Messages: 25
Registered: December 2004
Junior Member
coold wrote:
> The following code gives me syntax error for the last two endfor
> statements. I am trying to use the nested for loop to print the value
> of x. I have tried &$ on the 6th and 7th while $ on 1 and 2.
> Any help would be appreciated
>
> 1 for i = 0, 20 do begin
> 2 for j = 0, 20 do begin
> 3 for k = 0, 5 do b[0,k] = 0.5^2
> 4 funct_addnumbers, a,b,x ; where x is the result
> 5 print,x
> 6 endfor
> 7 endfor
>


At the comand prompt, each line is compiled individually.

Since nobody has mentioned it yet: you could enter ".run" at the
command prompt, then enter the whole thing up there, then enter "end".
That will do the same thing as dropping the whole thing into a file,
ending the file with "end" and then calling ".run filename".

I am assuming "funct_addunumbers" is your own creation and would like
to point you to the very handy "function" and "return" statements that
should enable you to turn your stuff into something like
print, funct_addnumbers(a,b)
...


cordially

Y.T.


--
Remove YourClothes before you email me.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Stretching an image
Next Topic: Re: combinatory analysis with restrictions

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 15:36:37 PDT 2025

Total time taken to generate the page: 1.04120 seconds