Thanks for your replies its very much appreciated

First I went with Sigh's script, but unfortunately found a problem with nested functions, example:
[/code]
$sin(2 + 3 * $cos(3 * 6))
;would return
$sin($calc(2 + 3 * $cos(3 * 6)))
;and not
$sin($calc(2 + 3 * $cos($calc(3 * 6))))
[/code]

Then i went with Kelders snippet and everything seemed to work fine. So thanks again all of you and got it working now!

Last edited by QuickStep; 26/07/05 05:03 PM.