Is ther any function available in maintain to find whether a number is divisible by 10 or not?I want to put it in conditional clause along with some other conditions also using AND operator.I am using INT (number) alongwith one more condition using AND but it is throwing "(FOC03636) 'Lazy' AND : Is Unsupported Syntax." Can anybody help please?
Thanks in advance.This message has been edited. Last edited by: Kerry,
I don't know why you would be getting a 'lazy and' error, but it is simple to avoid.
Something based on this example may help:
MAINTAIN FILE car
Declare divisible/a0;
Case top
for all next country car model bodytype into carStack;
Repeat carStack.focCount i/i4 = 1;
$$ make ENGLAND sales non-divisble by 10
carStack(i).sales = if carStack(i).country eq 'ENGLAND'
and carStack(i).sales ne 0
then carStack(i).sales + 5
else carStack(i).sales;
$$ check divisibilty by 10 as long as non-zero
divisible = if (INT(carStack(i).sales/10) eq carStack(i).sales/10)
and carStack(i).sales ne 0
then 'Divisible'
else 'Non-Divisible';
type "<carStack(i).sales <divisible";
endrepeat i = i + 1;
EndCase
END