Re: do something every 1000 records or so
- From: Jo <jodiepool@xxxxxxxxx>
- Date: 15 May 2007 04:09:40 -0700
On May 15, 10:36 am, Richard Senior <nos...@xxxxxxxxxxxxxxxxxxxx>
wrote:
Jo wrote:
Ok, this could be a perfect exam question, but it isn't and i need a
good solution
I'll believe you.
if beginRange == 0 || "some condition so it prints every 1000 records" {
I think you need the modulo (%) operator. This gives the remainder of an
integer division, which will, of course be zero every n records when you
modulo by n. For example 25 % 25 == 0, 50 % 25 == 0, 51 % 25 == 1 and so on.
--
Regards,
Richard
hi there:
the problem is that i dont have an exact brake, ie if i do a module on
1050 i ll get 1, and some mod
but what happens when i get 1090? i ll get 1 again, so how do i make
it print only the first time ?
.
- Follow-Ups:
- Re: do something every 1000 records or so
- From: Richard Senior
- Re: do something every 1000 records or so
- References:
- do something every 1000 records or so
- From: Jo
- Re: do something every 1000 records or so
- From: Richard Senior
- do something every 1000 records or so
- Prev by Date: adding action mapping to struts-config file in struts
- Next by Date: Re: EXE without JVM
- Previous by thread: Re: do something every 1000 records or so
- Next by thread: Re: do something every 1000 records or so
- Index(es):
Relevant Pages
|
Loading