Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.11.13;
Скачать: CL | DM;

Вниз

round   Найти похожие ветки 

 
uu ©   (2003-10-31 14:08) [0]

Подскажите как округлить значение типа Real.

Например 34,123456789 до 34,1235 то есть
нужно оставить 4 знака после запятой.


 
ZEE ©   (2003-10-31 14:09) [1]

RoundTo ?


 
uu ©   (2003-10-31 14:16) [2]

если можно с примером :)
а то я в хелпе покопался и не догнал как это делается :(


 
Плохиш_   (2003-10-31 14:18) [3]

>uu © (31.10.03 14:16) [2]

А в хелпе не копаться надо, а внимательно читать


 
uu ©   (2003-10-31 14:37) [4]

ну так скажите чтор там читать?


 
Плохиш_   (2003-10-31 14:41) [5]

RoundTo + F1


 
ZEE ©   (2003-10-31 14:46) [6]

Вот из хелпа

RoundTo function

Unit

Math

Category

Arithmetic routines

type TRoundToRange = -37..37;
function RoundTo(const AValue: Double; const ADigit: TRoundToRange): Double;

Description

Call RoundTo to round AValue to a specified power of ten.

AValue is the value to round.

ADigit indicates the power of ten to which you want AValue rounded. It can be any value from –37 to 37 (inclusive).

RoundTo uses “Banker’s Rounding” to determine how to round values that are exactly midway between the two values that have the desired number of significant digits. This method rounds to an even number in the case that AValue is not nearer to either value.

The following examples illustrate the use of RoundTo:

Expression Value

RoundTo(1234567, 3) 1234000
RoundTo(1.234, -2) 1.23
RoundTo(1.235, -2) 1.24
RoundTo(1.245, -2) 1.24

Note: The behavior of RoundTo can be affected by the Set8087CW procedure or SetRoundMode function.


еще что-то непонятно?..



Страницы: 1 вся ветка

Текущий архив: 2003.11.13;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.029 c
3-41052
-= Demon =-
2003-10-21 10:40
2003.11.13
Формат таблиц


1-41728
Bart
2003-11-03 13:49
2003.11.13
Kylix3 проблема с .so


11-41131
Kladov
2003-02-16 09:13
2003.11.13
Версия 1.68


14-41939
Ihor Osov'yak
2003-10-19 12:16
2003.11.13
Кстати, в чем причина почти суточного дауна форума?


6-41850
Andr
2003-09-11 16:52
2003.11.13
Проблемы в компоненте Indy IdFTP с докачкой файлов