summaryrefslogtreecommitdiffstats
path: root/helpcontent2/source/text/sbasic/shared/03070700.xhp
blob: 69a83b03cb63f23844f61060352ddbbc112909ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?xml version="1.0" encoding="UTF-8"?>
<helpdocument version="1.0">
<!--
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
-->

<meta>
  <topic id="textsbasicshared03070700xml" indexer="include" status="PUBLISH">
    <title id="tit" xml-lang="en-US">"\" Operator</title>
    <filename>/text/sbasic/shared/03070700.xhp</filename>
  </topic>
</meta>

<body>

<section id="IntegerDivision">
<h1 id="hd_id3150669"><link href="text/sbasic/shared/03070700.xhp">"\" Operator</link></h1>
<paragraph id="par_id3149670" role="paragraph" xml-lang="en-US">Performs the integer division on two numbers and returns the result.</paragraph>
</section>
<bookmark xml-lang="en-US" branch="index" id="bm_id3150669">
  <bookmark_value>Operators;Integer division (\\)</bookmark_value>
  <bookmark_value>"\\" operator (mathematical)</bookmark_value>
</bookmark>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<bascode>
   <paragraph id="par_id3153360" role="bascode" xml-lang="en-US">result = expression1 \ expression2 </paragraph>
</bascode>

<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph id="par_id3154141" role="paragraph" xml-lang="en-US"> <emph>result</emph>: A numerical value that contains the result of the integer division.</paragraph>
<paragraph id="par_id3150448" role="paragraph"> <emph>expression1, expression2</emph>: Dividend and diviser operands of the integer division.</paragraph>
<paragraph role="paragraph" id="par_id951642689912087">Before division both operands are rounded to whole numbers. The fractional part of the result is dropped.</paragraph>

<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph id="par_idm1341473008" role="bascode" localize="false">Sub IntegerDivision</paragraph>
<paragraph id="par_idm1341471776" role="bascode" xml-lang="en-US">    Print 5 \ 4 , 5 / 4   ' 1 , 1.25</paragraph>
<paragraph id="par_idm1341471777" role="bascode" xml-lang="en-US">    Print 7 \ 4 , 7 / 4   ' 1 , 1.75</paragraph>
<paragraph id="par_idm1341470544" role="bascode" localize="false">End Sub</paragraph>
</bascode>

<section id="relatedtopics">
   <embed href="text/sbasic/shared/03070600.xhp#MOD_h1"/>
   <embed href="text/sbasic/shared/03070000.xhp#MathOper_h1"/>
</section>

</body>
</helpdocument>