|
|
|
|
|
by maxbond
1071 days ago
|
|
Agreed, I rather like this line of code, but I must admit that the C-like version is perhaps better: sales_tax_amount = balance * state[42].tax_rate;
(Assuming I've guessed the meaning of the Cobol correctly - perhaps that's the rub.)(ETA: Added semicolon.) (ETA2: Fixed critical indexing bug.) |
|
Note the semicolon is significant. Barbaric, I know.