From afdcd47966ebd0a2f379c01aac2ea9b85bb6cb83 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Sun, 30 Dec 2018 19:19:07 -0200 Subject: [PATCH] tdf#114263 Add info for BASIC Spc() function Change-Id: Ic57ae1777e9e41c67a914b210b002f3ba89e678c Reviewed-on: https://gerrit.libreoffice.org/65753 Tested-by: Jenkins Reviewed-by: Olivier Hallot --- source/auxiliary/sbasic.tree | 1 + source/text/sbasic/shared/03120201.xhp | 42 +++++++++++++------------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/source/auxiliary/sbasic.tree b/source/auxiliary/sbasic.tree index c05ecbac5e..2bc0305b6f 100644 --- a/source/auxiliary/sbasic.tree +++ b/source/auxiliary/sbasic.tree @@ -255,6 +255,7 @@ Sin Function SLN Function [VBA] Space Function + Spc Function Split Function Sqr Function Square Root Calculation diff --git a/source/text/sbasic/shared/03120201.xhp b/source/text/sbasic/shared/03120201.xhp index cc17ee433a..815a840c71 100644 --- a/source/text/sbasic/shared/03120201.xhp +++ b/source/text/sbasic/shared/03120201.xhp @@ -20,7 +20,7 @@ - Space Function + Space and Spc Function /text/sbasic/shared/03120201.xhp @@ -30,38 +30,38 @@
Space function + Spc function -Space Function +Space and Spc Functions Returns a string that consists of a specified amount of spaces.
+The Spc function works the same as the Space function. + -Syntax: - -Space (n As Long) - +Space (n As Long)
+Spc (n As Long) -Return value: + String -Parameters: - n: Numeric expression that defines the number of spaces in the string. The maximum allowed value of n is 65535. + + n: Numeric expression that defines the number of spaces in the string. The maximum allowed value of n is 65535. -Example: + -Sub ExampleSpace -Dim sText As String,sOut As String -Dim iLen As Integer - iLen = 10 - sText = "Las Vegas" - sOut = sText & Space(iLen) & sText & Chr(13) &_ - sText & Space(iLen*2) & sText & Chr(13) &_ - sText & Space(iLen*4) & sText & Chr(13) - MsgBox sOut,0,"Info:" -End Sub +Sub ExampleSpace +Dim sText As String, sOut As String +Dim iLen As Integer + iLen = 10 + sText = "Las Vegas" + sOut = sText & Space(iLen) & sText & Chr(13) &_ + sText & Space(iLen*2) & sText & Chr(13) &_ + sText & Space(iLen*4) & sText & Chr(13) + MsgBox sOut,0,"Info:" +End Sub -