# Calculate the percentage change between an old value and a new value # Copyright (c) 2008-2012 by Hamilton Laboratories. All rights reserved. proc percentchg( oldvalue, newvalue ) if (oldvalue == 0) then echo -2 percentchg: The old value cannot be 0 @ status = 1 else return 100 * (newvalue - oldvalue)/oldvalue end end percentchg $argv |