Re: do something every 1000 records or so
- From: Richard Senior <nospam@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 15 May 2007 10:36:23 +0100
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
.
- Follow-Ups:
- References:
- Prev by Date: Re: method for a class constructor
- Next by Date: adding action mapping to struts-config file in struts
- Previous by thread: do something every 1000 records or so
- Next by thread: Re: do something every 1000 records or so
- Index(es):
Relevant Pages
|