From 61f776502b8f75b00f3c6c2d000a28e6d2415608 Mon Sep 17 00:00:00 2001 From: Rüdiger Timm Date: Fri, 26 Nov 2004 14:13:22 +0000 Subject: INTEGRATION: CWS helpcontentbeta (1.1.2); FILE MERGED 2004/09/16 11:45:34 fpe 1.1.2.1: Regular Update --- .../source/text/sbasic/shared/03090412.xhp | 103 +++++++++++---------- .../source/text/sbasic/shared/03100100.xhp | 68 +++++++------- .../source/text/sbasic/shared/03100300.xhp | 51 +++++----- .../source/text/sbasic/shared/03100400.xhp | 51 +++++----- .../source/text/sbasic/shared/03100500.xhp | 53 ++++++----- .../source/text/sbasic/shared/03100600.xhp | 53 ++++++----- 6 files changed, 200 insertions(+), 179 deletions(-) (limited to 'helpcontent2/source/text') diff --git a/helpcontent2/source/text/sbasic/shared/03090412.xhp b/helpcontent2/source/text/sbasic/shared/03090412.xhp index 8f2552d329..f5315fb499 100644 --- a/helpcontent2/source/text/sbasic/shared/03090412.xhp +++ b/helpcontent2/source/text/sbasic/shared/03090412.xhp @@ -53,63 +53,68 @@ * * ************************************************************************--> + -Exit Statement [Runtime] +Exit Statement [Runtime] /text/sbasic/shared/03090412.xhp Sun Microsystems, Inc. -converted from old format - fpe +converted from old format - fpe - - -
- Exit;statementExit Statement [Runtime] - Exits a Do...Loop, For...Next, a function, or a subroutine. -
- Syntax: - see Parameters - Parameters: - Exit Do - Only valid within a Do...Loop statement to exit the loop. Program execution continues with the statement that follows the Loop statement. If Do...Loop statements are nested, the control is transferred to the loop in the next higher level. - Exit For - Only valid within a For...Next loop to exit the loop. Program execution continues with the first statement that follows the Next statement. In nested statements, the control is transferred to the loop in the next higher level. - Exit Function - Exits the Function procedure immediately. Program execution continues with the statement that follows the Function call. - Exit Sub - Exits the subroutine immediately. Program execution continues with the statement that follows the Sub call. - The Exit statement does not define the end of a structure, and must not be confused with the End statement. - Example: - Sub ExampleExit - Dim sReturn As String - Dim sListArray(10) as String - Dim siStep as Single - For siStep = 0 to 10 REM Fill array with test data - sListArray(siStep) = chr(siStep + 65) - msgbox sListArray(siStep) - next siStep - sReturn = LinSearch(sListArray(), "B") - Print sReturn - end sub - - - Function LinSearch( sList(), sItem As String ) as integer - dim iCount as Integer - REM LinSearch searches a TextArray:sList() for a TextEntry: - REM Returns the index of the entry or 0 ( Null) - for iCount=1 to Ubound( sList() ) - if sList( iCount ) = sItem then - Exit for REM sItem found - end if - next iCount - if iCount = Ubound( sList() ) then iCount = 0 - LinSearch = iCount - end function - - - +
+Exit statement + +Exit Statement [Runtime] +Exits a Do...Loop, For...Next, a function, or a subroutine. +
+Syntax: +see Parameters +Parameters: + +Exit Do + +Only valid within a Do...Loop statement to exit the loop. Program execution continues with the statement that follows the Loop statement. If Do...Loop statements are nested, the control is transferred to the loop in the next higher level. + +Exit For + +Only valid within a For...Next loop to exit the loop. Program execution continues with the first statement that follows the Next statement. In nested statements, the control is transferred to the loop in the next higher level. + +Exit Function + +Exits the Function procedure immediately. Program execution continues with the statement that follows the Function call. + +Exit Sub + +Exits the subroutine immediately. Program execution continues with the statement that follows the Sub call. +The Exit statement does not define the end of a structure, and must not be confused with the End statement. +Example: +Sub ExampleExit +Dim sReturn As String +Dim sListArray(10) as String +Dim siStep as Single +For siStep = 0 to 10 REM Fill array with test data +sListArray(siStep) = chr(siStep + 65) +msgbox sListArray(siStep) +next siStep +sReturn = LinSearch(sListArray(), "B") +Print sReturn +end sub +Function LinSearch( sList(), sItem As String ) as integer +dim iCount as Integer +REM LinSearch searches a TextArray:sList() for a TextEntry: +REM Returns the index of the entry or 0 ( Null) +for iCount=1 to Ubound( sList() ) +if sList( iCount ) = sItem then +Exit for REM sItem found +end if +next iCount +if iCount = Ubound( sList() ) then iCount = 0 +LinSearch = iCount +end function +
diff --git a/helpcontent2/source/text/sbasic/shared/03100100.xhp b/helpcontent2/source/text/sbasic/shared/03100100.xhp index 940f8580f7..058a6d69b9 100755 --- a/helpcontent2/source/text/sbasic/shared/03100100.xhp +++ b/helpcontent2/source/text/sbasic/shared/03100100.xhp @@ -52,45 +52,49 @@ * Contributor(s): _______________________________________ * * - ************************************************************************--> + ************************************************************************--> + + -CBool Function [Runtime] +CBool Function [Runtime] /text/sbasic/shared/03100100.xhp Sun Microsystems, Inc. -converted from old format - fpe +converted from old format - fpe - - -
- CBool;functionCBool Function [Runtime] - Converts a string comparison or numeric comparison to a Boolean expression, or converts a single numeric expression to a Boolean expression. -
- Syntax: - CBool (Expression1 {= | <> | < | > | <= | >=} Expression2) or CBool (Number) - Return value: - Bool - Parameters: - Expression1, Expression2: Any string or numeric expressions that you want to compare. If the expressions match, the CBool function returns True, otherwise False is returned. - Number: Any numeric expression that you want to convert. If the expression equals 0, False is returned, otherwise True is returned. - The following example uses the CBool function to evaluate the value that is returned by the Instr function. The function checks if the word "and" is found in the sentence that was entered by the user. - - - Example: - Sub ExampleCBool - Dim sText As String - sText = InputBox("Please enter a short sentence:") - REM Proof if the word »and« appears in the sentence. - REM Instead of the command line - REM If Instr(Input, "and")<>0 Then... - REM the CBool function is applied as follows: - If CBool(Instr(sText, "and")) Then - MsgBox "The word »and« appears in the sentence you entered!" - EndIf - End Sub - +
+CBool function + +CBool Function [Runtime] +Converts a string comparison or numeric comparison to a Boolean expression, or converts a single numeric expression to a Boolean expression. +
+Syntax: +CBool (Expression1 {= | <> | < | > | <= | >=} Expression2) or CBool (Number) +Return value: +Bool +Parameters: + +Expression1, Expression2: Any string or numeric expressions that you want to compare. If the expressions match, the CBool function returns True, otherwise False is returned. + +Number: Any numeric expression that you want to convert. If the expression equals 0, False is returned, otherwise True is returned. +The following example uses the CBool function to evaluate the value that is returned by the Instr function. The function checks if the word "and" is found in the sentence that was entered by the user. + + +Example: +Sub ExampleCBool +Dim sText As String +sText = InputBox("Please enter a short sentence:") +REM Proof if the word »and« appears in the sentence. +REM Instead of the command line +REM If Instr(Input, "and")<>0 Then... +REM the CBool function is applied as follows: +If CBool(Instr(sText, "and")) Then +MsgBox "The word »and« appears in the sentence you entered!" +EndIf +End Sub +
diff --git a/helpcontent2/source/text/sbasic/shared/03100300.xhp b/helpcontent2/source/text/sbasic/shared/03100300.xhp index 8bc23a374f..529aa0a44a 100755 --- a/helpcontent2/source/text/sbasic/shared/03100300.xhp +++ b/helpcontent2/source/text/sbasic/shared/03100300.xhp @@ -52,37 +52,40 @@ * Contributor(s): _______________________________________ * * - ************************************************************************--> + ************************************************************************--> + + -CDate Function [Runtime] +CDate Function [Runtime] /text/sbasic/shared/03100300.xhp Sun Microsystems, Inc. -converted from old format - fpe +converted from old format - fpe - - -
- CDate;functionCDate Function [Runtime] - Converts any string or numeric expression expression to a date value. -
- Syntax: - CDate (Expression) - Return value: - Date - Parameters: - Expression: Any string or numeric expression that you want to convert. - When you convert a string expression, the date and time must be entered in the format MM.DD.YYYY HH.MM.SS, as defined by the DateValue and TimeValue function conventions. In numeric expressions, values to the left of the decimal represent the date, beginning from December 31, 1899. Values to the right of the decimal represent the time. - - - Example: - sub ExampleCDate - MsgBox cDate(1000.25) REM 09.26.1902 06:00:00 - MsgBox cDate(1001.26) REM 09.27.1902 06:14:24 - end sub - +
+CDate function + +CDate Function [Runtime] +Converts any string or numeric expression expression to a date value. +
+Syntax: +CDate (Expression) +Return value: +Date +Parameters: + +Expression: Any string or numeric expression that you want to convert. +When you convert a string expression, the date and time must be entered in the format MM.DD.YYYY HH.MM.SS, as defined by the DateValue and TimeValue function conventions. In numeric expressions, values to the left of the decimal represent the date, beginning from December 31, 1899. Values to the right of the decimal represent the time. + + +Example: +sub ExampleCDate +MsgBox cDate(1000.25) REM 09.26.1902 06:00:00 +MsgBox cDate(1001.26) REM 09.27.1902 06:14:24 +end sub +
diff --git a/helpcontent2/source/text/sbasic/shared/03100400.xhp b/helpcontent2/source/text/sbasic/shared/03100400.xhp index c6fc884250..8f97f67bb4 100755 --- a/helpcontent2/source/text/sbasic/shared/03100400.xhp +++ b/helpcontent2/source/text/sbasic/shared/03100400.xhp @@ -52,37 +52,40 @@ * Contributor(s): _______________________________________ * * - ************************************************************************--> + ************************************************************************--> + + -CDbl Function [Runtime] +CDbl Function [Runtime] /text/sbasic/shared/03100400.xhp Sun Microsystems, Inc. -converted from old format - fpe +converted from old format - fpe - - -
- CDbl;functionCDbl Function [Runtime] - Converts any numerical expression or string expression to a double type. -
- Syntax - CDbl (Expression) - Return value - Double - Parameters: - Expression: Any string or numeric expression that you want to convert. To convert a string expression, the number must be entered as normal text ("123.5") using the default number format of your operating system. - - - Example: - Sub ExampleCountryConvert - Msgbox CDbl(1234.5678) - Msgbox CInt(1234.5678) - Msgbox CLng(1234.5678) - end sub - +
+CDbl function + +CDbl Function [Runtime] +Converts any numerical expression or string expression to a double type. +
+Syntax +CDbl (Expression) +Return value +Double +Parameters: + +Expression: Any string or numeric expression that you want to convert. To convert a string expression, the number must be entered as normal text ("123.5") using the default number format of your operating system. + + +Example: +Sub ExampleCountryConvert +Msgbox CDbl(1234.5678) +Msgbox CInt(1234.5678) +Msgbox CLng(1234.5678) +end sub +
diff --git a/helpcontent2/source/text/sbasic/shared/03100500.xhp b/helpcontent2/source/text/sbasic/shared/03100500.xhp index be8a514709..8e49a0ecda 100755 --- a/helpcontent2/source/text/sbasic/shared/03100500.xhp +++ b/helpcontent2/source/text/sbasic/shared/03100500.xhp @@ -52,38 +52,41 @@ * Contributor(s): _______________________________________ * * - ************************************************************************--> + ************************************************************************--> + + -CInt Function [Runtime] +CInt Function [Runtime] /text/sbasic/shared/03100500.xhp Sun Microsystems, Inc. -converted from old format - fpe +converted from old format - fpe - - -
- CInt;functionCInt Function [Runtime] - Converts any string or numeric expression to an integer. -
- Syntax: - CInt (Expression) - Return value: - Integer - Parameters: - Expression: Any numeric expression that you want to convert. If the Expression exceeds the value range between -32768 and 32767, $[officename] Basic reports an overflow error. To convert a string expression, the number must be entered as normal text ("123.5") using the default number format of your operating system. - This function always rounds the fractional part of a number to the nearest integer. - - - Example: - Sub ExampleCountryConvert - Msgbox CDbl(1234.5678) - Msgbox CInt(1234.5678) - Msgbox CLng(1234.5678) - end sub - +
+CInt function + +CInt Function [Runtime] +Converts any string or numeric expression to an integer. +
+Syntax: +CInt (Expression) +Return value: +Integer +Parameters: + +Expression: Any numeric expression that you want to convert. If the Expression exceeds the value range between -32768 and 32767, $[officename] Basic reports an overflow error. To convert a string expression, the number must be entered as normal text ("123.5") using the default number format of your operating system. +This function always rounds the fractional part of a number to the nearest integer. + + +Example: +Sub ExampleCountryConvert +Msgbox CDbl(1234.5678) +Msgbox CInt(1234.5678) +Msgbox CLng(1234.5678) +end sub +
diff --git a/helpcontent2/source/text/sbasic/shared/03100600.xhp b/helpcontent2/source/text/sbasic/shared/03100600.xhp index 1ba707df07..d90c1898b3 100755 --- a/helpcontent2/source/text/sbasic/shared/03100600.xhp +++ b/helpcontent2/source/text/sbasic/shared/03100600.xhp @@ -52,38 +52,41 @@ * Contributor(s): _______________________________________ * * - ************************************************************************--> + ************************************************************************--> + + -CLng Function [Runtime] +CLng Function [Runtime] /text/sbasic/shared/03100600.xhp Sun Microsystems, Inc. -converted from old format - fpe +converted from old format - fpe - - -
- CLng;functionCLng Function [Runtime] - Converts any string or numeric expression to a long integer. -
- Syntax: - CLng (Expression) - Return value: - Long - Parameters: - Expression: Any numerical expression that you want to convert. If the Expression lies outside the valid long integer range between -2.147.483.648 and 2.147.483.647, $[officename] Basic returns an overflow error. To convert a string expression, the number must be entered as normal text ("123.5") using the default number format of your operating system. - This function always rounds the fractional part of a number to the nearest integer. - - - Example: - Sub ExampleCountryConvert - Msgbox CDbl(1234.5678) - Msgbox CInt(1234.5678) - Msgbox CLng(1234.5678) - end sub - +
+CLng function + +CLng Function [Runtime] +Converts any string or numeric expression to a long integer. +
+Syntax: +CLng (Expression) +Return value: +Long +Parameters: + +Expression: Any numerical expression that you want to convert. If the Expression lies outside the valid long integer range between -2.147.483.648 and 2.147.483.647, $[officename] Basic returns an overflow error. To convert a string expression, the number must be entered as normal text ("123.5") using the default number format of your operating system. +This function always rounds the fractional part of a number to the nearest integer. + + +Example: +Sub ExampleCountryConvert +Msgbox CDbl(1234.5678) +Msgbox CInt(1234.5678) +Msgbox CLng(1234.5678) +end sub +
-- cgit