Loop / Endloop 101 Help


#1

I’m having a brain cramp, and have completely forgotten how to implement a loop. I’ve read the “Loop” and “Endloop” help topics multiple times, but am missing something.

I have a list of companies with their respective complete address in another field. I’ve written a procedure that takes apart the complete address and populates fields for each component: Street Address, City, State, Postal. But of course, on it’s own it only works on the active record. I’d like to have it run on all the records in the file.

Frequently I use formulafill statements when I want to run a procedure on a field. But those tend to be slow when there are variables and multiple fields in the mix, and plus, I know there’s a better way. I used to know how, but it’s been awhile and I’ve forgotten.

Before raising the white flag here I searched the tutorial and video index for lessons on Loops, but didn’t find anything.

Any help, either by pointing me towards a tutorial or suggestions for my procedure would be greatly appreciated.
Thanks


#2

Something simple like:

NoShow
firstrecord
field Name
loop
	// do your stuff here for the current record
	downrecord
until info("stopped")
EndNoShow
Showpage

Using the NoShow, EndNoShow and Showpage scheme increases the speed by several factors.


#3

Gary,

downrecord combined with info(“stopped”) is just what I was looking for.

NoShow/Show is bonus help!

Worked like a charm.

Thank you,
Jim