diff --git a/tables/tables.tbs b/tables/tables.tbs index 2cc665d..7404e8b 100644 --- a/tables/tables.tbs +++ b/tables/tables.tbs @@ -2278,6 +2278,13 @@ public function tbl_field_sg(byref field_name as string,byref field_value as str dim tmp_f as float=0 strtobin(tmp_f,s,4) field_value=fstr(tmp_f) + dim pos as byte = instr(1,field_value, ".", 1) + if pos <> 0 then + if instr(1,field_value,"-",1) <> 0 then + pos=pos-1 + end if + field_value=ftostr(tmp_f,FTOSTR_MODE_PLAIN,pos+99) + end if if tbl_field_info(field_index).field_type=EN_TBL_FIELD_TIME then p1=0 p2=86400 diff --git a/utils/utils.tbs b/utils/utils.tbs index c5567f4..82cca2f 100644 --- a/utils/utils.tbs +++ b/utils/utils.tbs @@ -213,7 +213,7 @@ function ftofixed(r as real, decimals as byte) as string if instr(1,ftofixed,"-",1) <> 0 then pos=pos-1 end if - ftofixed=ftostr(r,FTOSTR_MODE_AUTO,pos+decimals-1) + ftofixed=ftostr(r,FTOSTR_MODE_PLAIN,pos+decimals-1) end if end function