1<?xml version="1.0" encoding="UTF-8"?> 2 3 4 5<!-- 6 *********************************************************************** 7 * 8 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 9 * 10 * Copyright 2000, 2010 Oracle and/or its affiliates. 11 * 12 * OpenOffice.org - a multi-platform office productivity suite 13 * 14 * This file is part of OpenOffice.org. 15 * 16 * OpenOffice.org is free software: you can redistribute it and/or modify 17 * it under the terms of the GNU Lesser General Public License version 3 18 * only, as published by the Free Software Foundation. 19 * 20 * OpenOffice.org is distributed in the hope that it will be useful, 21 * but WITHOUT ANY WARRANTY; without even the implied warranty of 22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 * GNU Lesser General Public License version 3 for more details 24 * (a copy is included in the LICENSE file that accompanied this code). 25 * 26 * You should have received a copy of the GNU Lesser General Public License 27 * version 3 along with OpenOffice.org. If not, see 28 * <http://www.openoffice.org/license.html> 29 * for a copy of the LGPLv3 License. 30 * 31 ************************************************************************ 32 --> 33 34 35 <helpdocument version="1.0"> 36<meta> 37<topic id="textsbasicshared03080502xml" indexer="include" status="PUBLISH"> 38<title id="tit" xml-lang="en-US">Int Function [Runtime]</title> 39<filename>/text/sbasic/shared/03080502.xhp</filename> 40</topic> 41</meta> 42<body> 43<section id="int"> 44<bookmark xml-lang="en-US" branch="index" id="bm_id3153345"><bookmark_value>Int function</bookmark_value> 45</bookmark> 46<paragraph role="heading" id="hd_id3153345" xml-lang="en-US" level="1" l10n="U" oldref="1"><link href="text/sbasic/shared/03080502.xhp" name="Int Function [Runtime]">Int Function [Runtime]</link></paragraph> 47<paragraph role="paragraph" id="par_id3155420" xml-lang="en-US" l10n="U" oldref="2">Returns the integer portion of a number.</paragraph> 48</section> 49<paragraph role="heading" id="hd_id3147559" xml-lang="en-US" level="2" l10n="U" oldref="3">Syntax:</paragraph> 50<paragraph role="paragraph" id="par_id3146795" xml-lang="en-US" l10n="U" oldref="4">Int (Number)</paragraph> 51<paragraph role="heading" id="hd_id3149670" xml-lang="en-US" level="2" l10n="U" oldref="5">Return value:</paragraph> 52<paragraph role="paragraph" id="par_id3150400" xml-lang="en-US" l10n="U" oldref="6">Double</paragraph> 53<paragraph role="heading" id="hd_id3149656" xml-lang="en-US" level="2" l10n="U" oldref="7">Parameters:</paragraph> 54<paragraph role="paragraph" id="par_id3148797" xml-lang="en-US" l10n="CHG" oldref="8"> 55<emph>Number:</emph> Any valid numeric expression.</paragraph> 56<embed href="text/sbasic/shared/00000003.xhp#errorcode"/> 57<embed href="text/sbasic/shared/00000003.xhp#err5"/> 58<paragraph role="heading" id="hd_id3148672" xml-lang="en-US" level="2" l10n="U" oldref="9">Example:</paragraph> 59<paragraph role="paragraph" id="par_id3156214" xml-lang="en-US" l10n="U" oldref="10">sub ExampleINT</paragraph> 60<paragraph role="paragraph" id="par_id3125864" xml-lang="en-US" l10n="CHG" oldref="11">Print Int(3.99) REM returns the value 3</paragraph> 61<paragraph role="paragraph" id="par_id3145787" xml-lang="en-US" l10n="CHG" oldref="12">Print Int(0) REM returns the value 0</paragraph> 62<paragraph role="paragraph" id="par_id3153143" xml-lang="en-US" l10n="CHG" oldref="13">Print Int(-3.14159) REM returns the value -4</paragraph> 63<paragraph role="paragraph" id="par_id3152578" xml-lang="en-US" l10n="U" oldref="14">end sub</paragraph> 64</body> 65</helpdocument> 66