[Reference] System.Trunc
Delphi
function Trunc(X: Real): Int64;
Properties
Type |
Visibility |
Source |
Unit |
Parent |
function |
public |
System.pas |
Description
Truncates a real number to an integer.
In Delphi code, the Trunc function truncates a real-type value to an integer-type value.
X is a real-type expression.
Trunc returns an Int64 value that is the value of X rounded toward zero.
If the truncated value of X is not within the Int64 range, an EInvalidOp exception is raised.
실수를 정수로 자릅니다.
Delphi 코드에서 Trunc 함수는 실수형 값을 정수형 값으로 자릅니다.
X는 실수형 표현입니다.
Trunc는 X 값을 0으로 반올림 한 Int64 값을 반환합니다.
X의 잘린 값이 Int64 범위 내에 있지 않으면, EInvalidOp 예외가 발생합니다.
Example
var Num: Single; begin Num := 3.14;
// 결과: 3 Writeln(Trunc(Num)); Readln; end. |
truncate 미국식 [|trʌŋkeɪt] (아래나 위를 잘라서) 길이를 줄이다 within 미국·영국 [wɪ|ðɪn] 1. (특정한 기간) 이내에 |
출처: http://docwiki.embarcadero.com/Libraries/XE2/en/System.Trunc