diff options
-rw-r--r-- | matheunit.pas | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/matheunit.pas b/matheunit.pas index 9ee4f4b..dd3517c 100644 --- a/matheunit.pas +++ b/matheunit.pas @@ -544,7 +544,7 @@ var inv,neg,cbv: boolean; val1,val2: extended; const - fkt1: array[0..9] of string = ('exp','sin','cos','tan','sqr','sqrt','ln','round','floor','ceil'); + fkt1: array[0..10] of string = ('exp','sin','cos','tan','sqr','sqrt','ln','round','floor','ceil','abs'); fkt2: array[0..2] of string = ('min','max','mod'); begin s:=trimAll(s); @@ -576,6 +576,7 @@ begin 7: val1:=round(val1); 8: val1:=floor(val1); 9: val1:=ceil(val1); + 10: val1:=abs(val1); end{of case}; s:=copy(s,1,k-1) + floattostr(val1) + copy(s,j+1,length(s)); end; |