From 99f11e2b8f4b126579cf81c63efc24c9eb7e1444 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 2 Oct 2019 09:01:11 +0200 Subject: matheunit.pas: exprToStr() kennt nun auch "abs()" --- matheunit.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'matheunit.pas') 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; -- cgit v1.2.3-70-g09d2