diff options
Diffstat (limited to 'helpcontent2/source/text/sbasic/shared/partition.xhp')
-rw-r--r-- | helpcontent2/source/text/sbasic/shared/partition.xhp | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/helpcontent2/source/text/sbasic/shared/partition.xhp b/helpcontent2/source/text/sbasic/shared/partition.xhp new file mode 100644 index 000000000..617f0d806 --- /dev/null +++ b/helpcontent2/source/text/sbasic/shared/partition.xhp @@ -0,0 +1,60 @@ +<?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="vbapartition" indexer="include" status="PUBLISH"> + <title id="tit" xml-lang="en-US">Partition Function</title> + <filename>/text/sbasic/shared/partition.xhp</filename> + </topic> + </meta> + <body> + <section id="vbapartition"> + <bookmark xml-lang="en-US" branch="index" id="bm_id31548421805896"> + <bookmark_value>Partition Function</bookmark_value> + </bookmark> + <h1 id="hd_id171548419512929"><link href="text/sbasic/shared/partition.xhp" name="Partition function">Partition Function [VBA]</link></h1> + <paragraph role="paragraph" id="par_id461548419700445">Returns a string indicating where a number occurs within a calculated series of ranges.</paragraph> + </section> + <embed href="text/sbasic/shared/00000003.xhp#vbasupport"/> + <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/> + <paragraph role="code" id="par_id111548419647867">Partition( Number, Start, End, Interval)</paragraph> + <embed href="text/sbasic/shared/00000003.xhp#functvalue"/> + <paragraph role="paragraph" localize="false" id="par_id971548420129767">String</paragraph> + + <embed href="text/sbasic/shared/00000003.xhp#functparameters"/> + <paragraph role="paragraph" id="par_id481548420000538"><emph>Number</emph>: Required. The number to determine the partition.</paragraph> + <paragraph role="paragraph" id="par_id841548420006137"><emph>Start</emph>: Required. An integer number defining the lower value of the range of numbers.</paragraph> + <paragraph role="paragraph" id="par_id781548420012105"><emph>End</emph>: Required. An integer number defining the highest value of the range.</paragraph> + <paragraph role="paragraph" id="par_id371548420017250"><emph>Interval</emph>: Required. An integer number that specifies the size of the partitions within the range of numbers (between Start and End).</paragraph> + + <embed href="text/sbasic/shared/00000003.xhp#functexample"/> + <bascode> + <paragraph role="bascode" id="par_id321548420503855" xml-lang="en-US" localize="false">Option VBASupport 1</paragraph> + <paragraph role="bascode" id="par_id431548420514604" xml-lang="en-US" localize="false">Option Explicit</paragraph> + <paragraph role="bascode" id="par_id181548420522842" xml-lang="en-US" localize="false">Sub Test_Partition</paragraph> + <paragraph role="bascode" id="par_id721548420527861" xml-lang="en-US" localize="false"> Dim retStr As String</paragraph> + <paragraph role="bascode" id="par_id21548420534821" xml-lang="en-US" localize="false"> retStr = Partition(20, 0, 98, 5)</paragraph> + <paragraph role="bascode" id="par_id561548420541509" xml-lang="en-US"> print "20:24 the number 20 occurs in the range: " & retStr</paragraph> + <paragraph role="bascode" id="par_id261548420553088" xml-lang="en-US" localize="false"> retStr = Partition(20, 0, 99, 1)</paragraph> + <paragraph role="bascode" id="par_id161548420558523" xml-lang="en-US"> print " 20: 20 the number 20 occurs in the range: " & retStr</paragraph> + <paragraph role="bascode" id="par_id251548420573894" xml-lang="en-US" localize="false"> retStr = Partition(120, 0, 99, 5)</paragraph> + <paragraph role="bascode" id="par_id561548420579525" xml-lang="en-US"> print "100: the number 120 occurs in the range: " & retStr</paragraph> + <paragraph role="bascode" id="par_id611548420591014" xml-lang="en-US" localize="false"> retStr = Partition(-5, 0, 99, 5)</paragraph> + <paragraph role="bascode" id="par_id921548420596118" xml-lang="en-US"> print " : -1 the number -5 occurs in the range: " & retStr</paragraph> + <paragraph role="bascode" id="par_id561548420604604" xml-lang="en-US" localize="false"> retStr = Partition(2, 0, 5, 2)</paragraph> + <paragraph role="bascode" id="par_id861548420616153" xml-lang="en-US" > print " 2: 3 the number 2 occurs in the range: " & retStr</paragraph> + <paragraph role="bascode" id="par_id841548421054219" xml-lang="en-US" localize="false">End Sub</paragraph> + </bascode> + <section id="relatedtopics"> + <embed href="text/sbasic/shared/00000003.xhp#VBAMath"/> + </section> +</body> +</helpdocument> |