For Programmers: Free Programming Magazines  


Home > Archive > Clarion > March 2004 > looping a file with filter









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author looping a file with filter
don zaragoza

2004-03-26, 11:01 pm

Hi everyone,

I want to loop a file with filter, using LOOP command. How can i do this?

thanks.
Kingsley Klosson

2004-03-26, 11:01 pm

If you do it with a process procedure, you can set the filter in the
template. If you have a had-coded loop, you will simply have to accommodate
it in the logic:

SET(File)
LOOP(File)
NEXT(File)
IF File:Column=SomeValue
Do something here
ELSE
Do something else, or nothing
END
END

"don zaragoza" <don@cybersyscorporation.com> wrote in message
news:22f4e84a.0403120630.2f59054d@posting.google.com...
> Hi everyone,
>
> I want to loop a file with filter, using LOOP command. How can i do

this?
>
> thanks.



Odd Johannesen

2004-03-26, 11:01 pm


Hi "don zaragoza"
I guess this example should work if ABC:
! Showing a total of all positive numbers.

GLO:TOTAL = 0 ! Muy importante
SET(Filename)
LOOP UNTIL EOF(Filename)
NEXT(Filename)
IF A:TALL > 0 ! Filter start
GLO:TOTAL += A:TALL ! Adding all positive numbers
END ! Filter end
END

Regards

Odd Johannesen
Granli 23
NO-4550 Farsund
NORWAY

E-mail: odd@toalango.com

<don@cybersyscorporation.com> skrev i melding
news:22f4e84a.0403120630.2f59054d@posting.google.com...
> Hi everyone,
>
> I want to loop a file with filter, using LOOP command. How can i do

this?
>
> thanks.



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com