` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Files, drivers etc.: Loop a file within a loop on that same file
2003-05-08 -- Michael Ware
 
Newsgroups: softvelocity.products.c55ee > Is this possible : > Having a file loen_fast > SET(LOF:key,LOF:key) > loop > if access:loen_fast.next() then break. > ! Do a lot of things on this loen_fast > LOF:field2 = 'Something in this record of loen_fast' > set(LOF:Key2,LOF:key2) > loop > if access:loen_fast.next() then break. > !Update some Loen_fast records end > end > > IE : Inside a loop of the records in one sort order, i want to make a lopp > in another sort order without interrupting the 'Outside' loop. I've done this a few times. Works like this: SET(LOF:key,LOF:key) loop if access:loen_fast.next() then break. ! Do a lot of things on this loen_fast HldPos = Position(LOF:key) LOF:field2 = 'Something in this record of loen_fast' set(LOF:Key2,LOF:key2) loop if access:loen_fast.next() then break. !Update some Loen_fast records end reset(LOF:key,HldPos) access:loen_fast.next() end The trick is you need to issue a next after the reset to get back to were you were. -Mike


Today is November 21, 2024, 6:39 am
This article has been viewed 35377 times.
Google search has resulted in 19 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: