diff options
author | Erich Eckner <git@eckner.net> | 2019-10-02 09:01:11 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-10-02 09:01:36 +0200 |
commit | 99f11e2b8f4b126579cf81c63efc24c9eb7e1444 (patch) | |
tree | 6be352d4f54c7ceccbf3f3f8e679d07a1551320d /matheunit.pas | |
parent | 76df851d4a53f694f0901d8a4af8c113757e70d3 (diff) | |
download | units-99f11e2b8f4b126579cf81c63efc24c9eb7e1444.tar.xz |
matheunit.pas: exprToStr() kennt nun auch "abs()"
Diffstat (limited to 'matheunit.pas')
-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; |