dbTalk Databases Forums  

Nested Loops in FMP7

comp.databases.filemaker comp.databases.filemaker


Discuss Nested Loops in FMP7 in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ron H.
 
Posts: n/a

Default Nested Loops in FMP7 - 09-20-2005 , 07:59 AM






Hi All,
I was wondering how people implemented nested Sript Loops in FMP7.
From my experience
1. You cannot nest or overlap Loops - they must be sequential standalone
blocks
2. If Then etc can be freely nested
3. I have needed nested Loops, but could only do it via clunky recursive
calls to the same script etc
How do others manage

Regards Ron H.



Reply With Quote
  #2  
Old   
42
 
Posts: n/a

Default Re: Nested Loops in FMP7 - 09-20-2005 , 02:41 PM






In article <AITXe.684$0E5.352 (AT) news-server (DOT) bigpond.net.au>, ronald_h70
@hotttmail.commm says...
Quote:
Hi All,
I was wondering how people implemented nested Sript Loops in FMP7.
By nesting them.

Quote:
From my experience
1. You cannot nest or overlap Loops - they must be sequential standalone
blocks
That is incorrect.

Quote:
2. If Then etc can be freely nested
Yep.

Quote:
3. I have needed nested Loops, but could only do it via clunky recursive
calls to the same script etc
How do others manage
set counter1=10;
loop
counter1 -1
set counter2 = 5;
loop
counter2 -1
new record
exit loop if counter2=0
end loop
exit loop if counter1=0
end loop

generates 50 records, as exected.


Reply With Quote
  #3  
Old   
Ron H.
 
Posts: n/a

Default THANKYOU Re: Nested Loops in FMP7 - 09-20-2005 , 07:12 PM



Thankyou 42,
What you suggested is indeed correct and now seems so simple, yet for some
reason when I did it, it produced erroneous results. Thankyou for your
assistance
Regards Ron H.

"42" <nospam (AT) nospam (DOT) com> wrote

Quote:
In article <AITXe.684$0E5.352 (AT) news-server (DOT) bigpond.net.au>, ronald_h70
@hotttmail.commm says...
Hi All,
I was wondering how people implemented nested Sript Loops in FMP7.

By nesting them.

From my experience
1. You cannot nest or overlap Loops - they must be sequential standalone
blocks

That is incorrect.

2. If Then etc can be freely nested

Yep.

3. I have needed nested Loops, but could only do it via clunky recursive
calls to the same script etc
How do others manage

set counter1=10;
loop
counter1 -1
set counter2 = 5;
loop
counter2 -1
new record
exit loop if counter2=0
end loop
exit loop if counter1=0
end loop

generates 50 records, as exected.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.