source/text/sbasic/shared/03120102.xhp | 16 ++++++++++------ source/text/sbasic/shared/03120112.xhp | 17 ++++++++--------- 2 files changed, 18 insertions(+), 15 deletions(-)
New commits: commit 2f76d8e9280cbe1e726cfcf2d4a798c8cf418241 Author: Alain Romedenne <libreoffici...@gerrit.libreoffice.org> AuthorDate: Thu Jan 20 09:39:06 2022 +0100 Commit: Rafael Lima <rafael.palma.l...@gmail.com> CommitDate: Wed Jan 26 21:32:01 2022 +0100 tdf#145693 tdf#141474 Chr ChrW method signatures Change-Id: If285713e1e76a661205f291f551cc988b194cd35 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/128542 Tested-by: Jenkins Reviewed-by: Rafael Lima <rafael.palma.l...@gmail.com> diff --git a/source/text/sbasic/shared/03120102.xhp b/source/text/sbasic/shared/03120102.xhp index b03ddeb2c..e0329d570 100644 --- a/source/text/sbasic/shared/03120102.xhp +++ b/source/text/sbasic/shared/03120102.xhp @@ -35,15 +35,17 @@ </section> <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/> - <paragraph id="par_id3150669" role="code" xml-lang="en-US">Chr[$](expression As Integer) As String</paragraph> + <bascode> + <paragraph role="bascode" id="bas_id91642668171601">Chr[$](charcode As Integer) As String</paragraph> + </bascode> <embed href="text/sbasic/shared/00000003.xhp#functvalue"/> <paragraph id="par_id3153824" role="paragraph" localize="false" xml-lang="en-US">String</paragraph> <embed href="text/sbasic/shared/00000003.xhp#functparameters"/> - <paragraph id="par_id3149295" role="paragraph" xml-lang="en-US"><emph>Expression:</emph> a numeric expression that represents a valid 8-bit ASCII value (0-255) or a 16-bit Unicode value. (To support expressions with a nominally negative argument like <emph>Chr(&H8000)</emph> in a backwards-compatible way, values in the range −32768 to −1 are internally mapped to the range 32768 to 65535.)</paragraph> + <paragraph id="par_id3149295" role="paragraph" xml-lang="en-US"><emph>charcode</emph>: a numeric expression that represents a valid 8-bit ASCII value (0-255) or a 16-bit Unicode value. (To support expressions with a nominally negative argument like <emph>Chr(&H8000)</emph> in a backwards-compatible way, values in the range −32768 to −1 are internally mapped to the range 32768 to 65535.)</paragraph> - <warning id="par_id991552913928635">When VBA compatibility mode is enabled (<link href="text/sbasic/shared/03103350.xhp" name="vbasupport"><literal>OPTION VBASUPPORT 1</literal></link>), <emph>Expression</emph> is a numeric expression that represents a valid 8-bit ASCII value (0-255) only.</warning> + <warning id="par_id991552913928635">When VBA compatibility mode is enabled (<link href="text/sbasic/shared/03103350.xhp" name="vbasupport"><literal>Option VBASupport 1</literal></link>), <literal>charcode</literal> is a numeric expression that represents a valid 8-bit ASCII value (0-255) only.</warning> <paragraph id="par_id3159414" role="paragraph" xml-lang="en-US">Use the <emph>Chr$</emph> function to send special control sequences to a printer or to another output source. You can also use it to insert quotation marks in a string expression.</paragraph> <embed href="text/sbasic/shared/00000003.xhp#errorcode"/> @@ -53,11 +55,13 @@ <embed href="text/sbasic/shared/00000003.xhp#functexample"/> <bascode> - <paragraph id="par_idm1341138080" role="bascode" localize="false" xml-lang="en-US">Sub ExampleChr</paragraph> + <paragraph id="par_idm1341138080" role="bascode" localize="false">Sub ExampleChr</paragraph> <paragraph id="par_id3154909" role="bascode" xml-lang="en-US"> ' This example inserts quotation marks (ASCII value 34) in a string.</paragraph> - <paragraph id="par_id3151380" role="bascode" xml-lang="en-US"> MsgBox "A "+ Chr$(34)+"short" + Chr(34)+" trip."</paragraph> + <paragraph id="par_id3151380" role="bascode" xml-lang="en-US"> MsgBox "A " + Chr$(34) + "short" + Chr(34) + " trip."</paragraph> <paragraph id="par_id3145174" role="bascode" xml-lang="en-US"> ' The printout appears in the dialog as: A "short" trip.</paragraph> - <paragraph id="par_idm1341131568" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> + <paragraph role="bascode" id="bas_id481642668824226" xml-lang="en-US"> MsgBox Chr(charcode := 64) ' "@" sign</paragraph> + <paragraph id="par_idm1341131568" role="bascode" localize="false">End Sub</paragraph> + <paragraph role="bascode" id="bas_id661642668825250"></paragraph> </bascode> <section id="relatedtopics"> diff --git a/source/text/sbasic/shared/03120112.xhp b/source/text/sbasic/shared/03120112.xhp index 05d2b8297..e1eba0429 100644 --- a/source/text/sbasic/shared/03120112.xhp +++ b/source/text/sbasic/shared/03120112.xhp @@ -27,35 +27,34 @@ <body> - <section id="chrw"> <bookmark xml-lang="en-US" branch="index" id="bm_id3149205"> <bookmark_value>ChrW function</bookmark_value> </bookmark> - <h1 id="hd_id3149205"><variable id="ChrW_h1"><link href="text/sbasic/shared/03120112.xhp" name="ChrW Function">ChrW Function [VBA]</link></variable></h1> <paragraph id="par_id3153311" role="paragraph">Returns the Unicode character that corresponds to the specified character code.</paragraph> </section> <embed href="text/sbasic/shared/00000003.xhp#vbasupport"/> <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/> <bascode> -<paragraph id="par_id3150669" role="bascode" xml-lang="en-US">ChrW(Expression As Integer) As String</paragraph> +<paragraph id="par_id3150669" role="bascode" localize="false">ChrW(charcode As Integer) As String</paragraph> </bascode> <embed href="text/sbasic/shared/00000003.xhp#functvalue"/> <paragraph id="par_id3153824" role="paragraph" xml-lang="en-US">String</paragraph> <embed href="text/sbasic/shared/00000003.xhp#functparameters"/> -<paragraph id="par_id3149295" role="paragraph" xml-lang="en-US"> <emph>Expression:</emph> Numeric variables that represent a valid 16 bit Unicode value (0-65535). (To support expressions with a nominally negative argument like <emph>ChrW(&H8000)</emph> in a backwards-compatible way, values in the range −32768 to −1 are internally mapped to the range 32768 to 65535.) An empty value returns error code 5. A value out of the range [0,65535] returns error code 6.</paragraph> +<paragraph id="par_id3149295" role="paragraph" xml-lang="en-US"> <emph>charcode</emph>: Numeric expression that represent a valid 16 bit Unicode value (0-65535). (To support expressions with a nominally negative argument like <emph>ChrW(&H8000)</emph> in a backwards-compatible way, values in the range −32768 to −1 are internally mapped to the range 32768 to 65535.) An empty value returns error code 5. A value out of the range [0 to 65535] returns error code 6.</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 id="par_idm1341138080" role="bascode" localize="false" xml-lang="en-US">Sub ExampleChrW</paragraph> -<paragraph id="par_id3154909" role="bascode" xml-lang="en-US"> ' This example inserts the Greek letters alpha and omega in a string.</paragraph> -<paragraph id="par_id3151380" role="bascode" xml-lang="en-US"> MsgBox "From "+ ChrW(913)+" to " + ChrW(937)</paragraph> -<paragraph id="par_id3145174" role="bascode" xml-lang="en-US"> ' The printout appears in the dialog as: From Α to Ω</paragraph> -<paragraph id="par_idm1341131568" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> +<paragraph id="par_idm1341138080" role="bascode" localize="false">Sub ExampleChrW</paragraph> +<paragraph id="par_id3154909" role="bascode" xml-lang="en-US"> ' This example inserts the Greek letters alpha and omega in a string.</paragraph> +<paragraph id="par_id3151380" role="bascode" xml-lang="en-US"> MsgBox "From " + ChrW(913) + " to " + ChrW(937)</paragraph> +<paragraph id="par_id3145174" role="bascode" xml-lang="en-US"> ' The printout appears in the dialog as: From Α to Ω</paragraph> +<paragraph role="bascode" id="bas_id181642669411658" xml-lang="en-US"> MsgBox ChrW(charcode := 116) ' "t" lowercase T letter</paragraph> +<paragraph id="par_idm1341131568" role="bascode" localize="false">End Sub</paragraph> </bascode> <section id="relatedtopics">