tdf#141474 CBool, CByte, CCur function signatures

Change-Id: Icd8febb66930020e39d310c7604a0419dccc9f0c
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/125137
Tested-by: Jenkins
Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com>
diff --git a/source/text/sbasic/shared/03100050.xhp b/source/text/sbasic/shared/03100050.xhp
index bd4a2b2..37bb4d4 100644
--- a/source/text/sbasic/shared/03100050.xhp
+++ b/source/text/sbasic/shared/03100050.xhp
@@ -32,17 +32,46 @@
<section id="ccur">
<bookmark xml-lang="en-US" branch="index" id="bm_id8926053"><bookmark_value>CCur function</bookmark_value>
</bookmark>
<paragraph role="heading" id="par_idN10541" xml-lang="en-US" level="1"><link href="text/sbasic/shared/03100050.xhp">CCur Function</link></paragraph>
<h1 id="par_idN10541"><variable id="CCur_h1"><link href="text/sbasic/shared/03100050.xhp">CCur Function</link></variable></h1>
<paragraph role="paragraph" id="par_idN10545" xml-lang="en-US">Converts a string expression or numeric expression to a currency expression. The locale settings are used for decimal separators and currency symbols.</paragraph>
</section>
<paragraph role="heading" id="par_idN10548" xml-lang="en-US" level="2">Syntax:</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<bascode>
<paragraph role="bascode" id="par_idN105E8" xml-lang="en-US">CCur(Expression)</paragraph>
<paragraph role="bascode" id="par_idN105E8" xml-lang="en-US">CCur(Expression As Variant) As Currency</paragraph>
</bascode>
<paragraph role="heading" id="par_idN105EB" xml-lang="en-US" level="2">Return value:</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functvalue"/>
<paragraph role="paragraph" id="par_idN105EF" xml-lang="en-US">Currency</paragraph>
<paragraph role="heading" id="par_idN105F2" xml-lang="en-US" level="2">Parameter:</paragraph>
<paragraph role="paragraph" id="par_idN105F6" xml-lang="en-US">Expression: Any string or numeric expression that you want to convert.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id3145068" xml-lang="en-US">
<emph>Expression</emph>: Any string or a numeric expression that you want to convert to a number. <br/><literal>CCur(EMPTY)</literal> returns 0.</paragraph>

<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
<embed href="text/sbasic/shared/00000003.xhp#err5"/>
<embed href="text/sbasic/shared/00000003.xhp#err6"/>

<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
  <paragraph role="bascode" id="bas_id1001637763908509" localize="false">Sub CCur_example</paragraph>
  <paragraph role="bascode" id="bas_id691637753542614" localize="false">    Print CCur( expression := 145.279 * "654" )</paragraph>
  <paragraph role="bascode" id="bas_id371637753545973" localize="false">    Print CCur( -258.0421E+02 )</paragraph>
  <paragraph role="bascode" id="bas_id771637763936773" localize="false">End Sub</paragraph>
</bascode>

<section id="relatedtopics">
  <embed href="text/sbasic/shared/03100100.xhp#CBool_h1"/>
  <embed href="text/sbasic/shared/03120105.xhp#CByte_h1"/>
<!-- WiP
  <embed href="text/sbasic/shared/03100050.xhp#CCur_h1"/>
  <embed href="text/sbasic/shared/03100300.xhp#CDate_h1"/>
  <embed href="text/sbasic/shared/03100400.xhp#CDbl_h1"/>
  <embed href="text/sbasic/shared/03100060.xhp#CDec_h1"/>
  <embed href="text/sbasic/shared/03100500.xhp#CInt_h1"/>
  <embed href="text/sbasic/shared/03100600.xhp#CLng_h1"/>
  <embed href="text/sbasic/shared/03100900.xhp#CSng_h1"/>
  <embed href="text/sbasic/shared/03101000.xhp#CStr_h1"/>
-->
</section>

</body>
</helpdocument>

diff --git a/source/text/sbasic/shared/03100100.xhp b/source/text/sbasic/shared/03100100.xhp
index e8f2b9e..cea7528 100644
--- a/source/text/sbasic/shared/03100100.xhp
+++ b/source/text/sbasic/shared/03100100.xhp
@@ -27,46 +27,62 @@

<body>


<section id="cbool">
<bookmark xml-lang="en-US" branch="index" id="bm_id3150616">
  <bookmark_value>CBool function</bookmark_value>
</bookmark>


<paragraph id="hd_id3150616" role="heading" level="1" xml-lang="en-US"><link href="text/sbasic/shared/03100100.xhp" name="CBool Function">CBool Function</link></paragraph>
<paragraph id="par_id3145136" role="paragraph" xml-lang="en-US">Converts a string comparison or numeric comparison to a Boolean expression, or converts a single numeric expression to a Boolean expression.</paragraph>
<h1 id="hd_id3150616" ><variable id="CBool_h1"><link href="text/sbasic/shared/03100100.xhp" name="CBool Function">CBool Function</link></variable></h1>
<paragraph id="par_id3145136" role="paragraph">Converts an expression or a set of expressions into a boolean. An expression is composed of strings, numbers and operators. Comparison, logical or mathematical operators are allowed inside expressions.</paragraph>
</section>

<paragraph id="hd_id3153345" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<bascode>
<paragraph id="par_id3149514" role="bascode" xml-lang="en-US">CBool (Expression1 {= | &lt;&gt; | &lt; | &gt; | &lt;= | &gt;=} Expression2) or CBool (Number)</paragraph>
  <paragraph id="par_id3194514" role="bascode" localize="false">CBool (expression As Variant) As Boolean</paragraph>
</bascode>
<paragraph role="paragraph" id="par_id681638266349216"><literal>expression</literal> can be a number or a set of combined expressions.</paragraph>
  
<embed href="text/sbasic/shared/00000003.xhp#functvalue"/>
<paragraph id="par_id3155419" role="paragraph" xml-lang="en-US">Boolean</paragraph>

<paragraph id="hd_id3156152" role="heading" level="2" xml-lang="en-US">Return value:</paragraph>
<paragraph id="par_id3155419" role="paragraph" xml-lang="en-US">Bool</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id791636986444058"><emph>expression</emph>: A logical expression, a mathematical formula, a numeric expression or a set of expressions combined with operators. During expression evaluation <link href="text/sbasic/shared/03060000.xhp" name="logical operators">logical operators</link> take preceedence over <link href="text/sbasic/shared/03110100.xhp" name="comparison operators">comparison operators</link>, which in turn take preceedence over <link href="text/sbasic/shared/03070000.xhp" name="mathematical operators">mathematical operators</link>.</paragraph>
<paragraph role="paragraph" id="par_id1001638264728895">The <literal>expression</literal> can be a number or mathematical formula. When equals to 0, <literal>False</literal> is returned, otherwise <literal>True</literal> is returned.</paragraph>
<paragraph id="par_id3149655" role="paragraph">Multiple expressions such as <input>expr1 [[{operator] expr2]..]</input> can be combined. <input>expr1</input> and <input>expr2</input> can be any string or numeric expressions that you want to evaluate. <literal>CBool</literal> combines the expressions and returns either <literal>True</literal> or <literal>False</literal>.  <input>operator</input> can be a <link href="text/sbasic/shared/03070000.xhp" name="mathematical operator">mathematical operator</link>, <link href="text/sbasic/shared/03060000.xhp" name="logical operator">logical operator</link> or <link href="text/sbasic/shared/03110100.xhp" name="comparison operator">comparison operator</link>.</paragraph>

<paragraph id="hd_id3147530" role="heading" level="2" xml-lang="en-US">Parameters:</paragraph>
<paragraph id="par_id3156344" role="paragraph" xml-lang="en-US"> <emph>Expression1, Expression2:</emph> Any string or numeric expressions that you want to compare. If the expressions match, the <emph>CBool</emph> function returns <emph>True</emph>, otherwise <emph>False</emph> is returned.</paragraph>
<paragraph id="par_id3149655" role="paragraph" xml-lang="en-US"> <emph>Number:</emph> Any numeric expression that you want to convert. If the expression equals 0, <emph>False</emph> is returned, otherwise <emph>True</emph> is returned.</paragraph>
<paragraph id="par_id3145171" role="paragraph" xml-lang="en-US">The following example uses the <emph>CBool</emph> function to evaluate the value that is returned by the <emph>Instr</emph> function. The function checks if the word "and" is found in the sentence that was entered by the user.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
<embed href="text/sbasic/shared/00000003.xhp#err5"/>

<paragraph id="hd_id3156212" role="heading" level="2" xml-lang="en-US">Example:</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<paragraph id="par_id3145171" role="paragraph" xml-lang="en-US">The following examples computes a logical expression and a mathematical formula. It uses the <literal>CBool</literal> function to evaluate the value that is returned by the <literal>Instr</literal> function. The function checks if the word "and" is found in the sentence that was entered by the user.</paragraph>
<bascode>
<paragraph id="par_idm1340987280" role="bascode" localize="false" xml-lang="en-US">Sub ExampleCBool</paragraph>
<paragraph id="par_idm1340986048" role="bascode" localize="false" xml-lang="en-US">Dim sText As String</paragraph>
<paragraph id="par_id3155132" role="bascode" xml-lang="en-US">    sText = InputBox("Please enter a short sentence:")</paragraph>
<paragraph id="par_idm1340987280" role="bascode" localize="false">Sub ExampleCBool</paragraph>
<paragraph role="bascode" id="bas_id961636989038747" xml-lang="en-US">    Print CBool( 1>2 Xor 44) ' computes to True</paragraph>
<paragraph role="bascode" id="bas_id991636996682074" xml-lang="en-US">    Print CBool( expression := "15" /2 -7.5 ) ' displays False as expression equals 0</paragraph>
<paragraph id="par_id3155132" role="bascode" xml-lang="en-US">    txt = InputBox("Please enter a short sentence:")</paragraph>
<paragraph id="par_id3155855" role="bascode" xml-lang="en-US">    ' Proof if the word »and« appears in the sentence.</paragraph>
<paragraph id="par_id3146984" role="bascode" xml-lang="en-US">    ' Instead of the command line</paragraph>
<paragraph id="par_id3148576" role="bascode" xml-lang="en-US">    ' If Instr(Input, "and")&lt;&gt;0 Then...</paragraph>
<paragraph id="par_id3154014" role="bascode" xml-lang="en-US">    ' the CBool function is applied as follows:</paragraph>
<paragraph id="par_id3155413" role="bascode" xml-lang="en-US">    If CBool(Instr(sText, "and")) Then</paragraph>
<paragraph id="par_id3155413" role="bascode" xml-lang="en-US">    If CBool(Instr(txt, "and")) Then</paragraph>
<paragraph id="par_id3152940" role="bascode" xml-lang="en-US">        MsgBox "The word »and« appears in the sentence you entered!"</paragraph>
<paragraph id="par_idm1340972320" role="bascode" localize="false" xml-lang="en-US">    EndIf</paragraph>
<paragraph id="par_idm1340971088" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph>
<paragraph id="par_idm1340972320" role="bascode" localize="false">    EndIf</paragraph>
<paragraph id="par_idm1340971088" role="bascode" localize="false">End Sub</paragraph>
</bascode>
</body>

<section id="relatedtopics">
  <embed href="text/sbasic/shared/03120105.xhp#CByte_h1"/>
  <embed href="text/sbasic/shared/03100050.xhp#CCur_h1"/>
<!-- WiP
  <embed href="text/sbasic/shared/03100300.xhp#CDate_h1"/>
  <embed href="text/sbasic/shared/03100400.xhp#CDbl_h1"/>
  <embed href="text/sbasic/shared/03100060.xhp#CDec_h1"/>
  <embed href="text/sbasic/shared/03100500.xhp#CInt_h1"/>
  <embed href="text/sbasic/shared/03100600.xhp#CLng_h1"/>
  <embed href="text/sbasic/shared/03100900.xhp#CSng_h1"/>
  <embed href="text/sbasic/shared/03101000.xhp#CStr_h1"/>
-->
</section>

</body>
</helpdocument>
\ No newline at end of file
\ No newline at end of file
diff --git a/source/text/sbasic/shared/03120105.xhp b/source/text/sbasic/shared/03120105.xhp
index e4d8bef..c47e6c6 100644
--- a/source/text/sbasic/shared/03120105.xhp
+++ b/source/text/sbasic/shared/03120105.xhp
@@ -32,20 +32,44 @@
<section id="cbyte">
<bookmark xml-lang="en-US" branch="index" id="bm_id3156027"><bookmark_value>CByte function</bookmark_value>
</bookmark>
<paragraph role="heading" id="hd_id3156027" xml-lang="en-US" level="1"><link href="text/sbasic/shared/03120105.xhp" name="CByte Function">CByte Function</link></paragraph>
<paragraph role="paragraph" id="par_id3143267" xml-lang="en-US">Converts a string or a numeric expression to the type Byte.</paragraph>
<h1 id="hd_id3156027"><variable id="CByte_h1"><link href="text/sbasic/shared/03120105.xhp" name="CByte Function">CByte Function</link></variable></h1>
<paragraph role="paragraph" id="par_id3143267" xml-lang="en-US">Converts a string or a numeric expression to the <literal>Byte</literal> type.</paragraph>
</section>
<paragraph role="heading" id="hd_id3149811" xml-lang="en-US" level="2">Syntax:</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<bascode>
<paragraph role="bascode" id="par_id3147573" xml-lang="en-US">Cbyte( expression )</paragraph>
<paragraph role="bascode" id="par_id3147573" xml-lang="en-US">Cbyte( expression As Variant) As Byte</paragraph>
</bascode>
<paragraph role="heading" id="hd_id3145315" xml-lang="en-US" level="2">Return value:</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functvalue"/>
<paragraph role="paragraph" id="par_id3148473" xml-lang="en-US">Byte</paragraph>
<paragraph role="heading" id="hd_id3147530" xml-lang="en-US" level="2">Parameters:</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph role="paragraph" id="par_id3145068" xml-lang="en-US">
<emph>Expression:</emph> A string or a numeric expression.</paragraph>
<emph>Expression</emph>: Any string or a numeric expression that can be evaluated to a number. Decimal values are rounded to the nearest tenth. Valid values range from 0 to 256.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
<embed href="text/sbasic/shared/00000003.xhp#err5"/>
<embed href="text/sbasic/shared/00000003.xhp#err6"/>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>

<bascode>
  <paragraph role="bascode" id="bas_id481637749236603" localize="false">Sub CByte_example</paragraph>
  <paragraph role="bascode" id="bas_id301637749237580" localize="false">    Print CByte( expression := "17"/2 + 7.44), CByte( EMPTY ), CByte(PI)</paragraph>
  <paragraph role="bascode" id="bas_id941637751110886" xml-lang="en-US">    ' Above expressions are computed as 16, 0 and 3</paragraph>
  <paragraph role="bascode" id="bas_id771637749238365" localize="false">End Sub</paragraph>
</bascode>

<section id="relatedtopics">
  <embed href="text/sbasic/shared/03100100.xhp#CBool_h1"/>
  <embed href="text/sbasic/shared/03100050.xhp#CCur_h1"/>
<!-- WiP
  <embed href="text/sbasic/shared/03100300.xhp#CDate_h1"/>
  <embed href="text/sbasic/shared/03100400.xhp#CDbl_h1"/>
  <embed href="text/sbasic/shared/03100060.xhp#CDec_h1"/>
  <embed href="text/sbasic/shared/03100500.xhp#CInt_h1"/>
  <embed href="text/sbasic/shared/03100600.xhp#CLng_h1"/>
  <embed href="text/sbasic/shared/03100900.xhp#CSng_h1"/>
  <embed href="text/sbasic/shared/03101000.xhp#CStr_h1"/>
-->
</section>


</body>
</helpdocument>