List:General Discussion« Previous MessageNext Message »
From:Chris White Date:December 7 2006 4:02pm
Subject:Re: Function problem
View as plain text  
On Thursday 07 December 2006 04:57, nikos wrote:
> WHEN x<50 THEN ceiling(x+x*0.25)
> when x>=50 AND x<100 then ceiling(x+x*0.20)
> when x>=100 AND x<150 then ceiling(x+x*0.15)
> when (x>=150 AND x<200) then (ceiling(x+x*0.10))
> when (x>=200) then (ceiling(x+x*0.09))

You've declared a return value for your function, but it doesn't return 
anything, what you probably want is:

> WHEN x<50 THEN return ceiling(x+x*0.25)

and the like for the rest of the cases.

Chris White
PHP Programmer
Function problemnikos7 Dec
  • Re: Function problemMartijn Tonies7 Dec
  • Re: Function problemChris White7 Dec
    • RE: Function problemnikos8 Dec