Apologies, this is a resend of the code fragment in my last email, which
appeared to be cut/reproduced incorrectly.  Hopefully this displays the tax
function properly:

   tax
--T-T---------------------------------------------------------------------┐
│4│:│NB. x is taxYYYY containing tax scales as above (eg Tax2005, Tax2006)│
│ │ │NB. y is list of salaries for which tax is to be calculated          │
│ │ │TaxBands =. 0{"1 x                                                   │
│ │ │TaxRates =. 1{"1 x                                                   │
│ │ │parts =. 0 >. (y <."0 1 }.TaxBands,_)-"1 TaxBands                    │
│ │ │tax =. parts +/ . * TaxRates                                         │
L-+-+----------------------------------------------------------------------

.../Rob


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to