LibreOffice 7.1 Help
λ¬Έμμ΄ λΉκ΅ λλ μ«μ λΉκ΅λ₯Ό λΆλ¦¬μΈ μμΌλ‘ λ³ννκ±°λ λ¨μΌ μ«μ μμ λΆλ¦¬μΈ μμΌλ‘ λ³νν©λλ€.
CBool (Expression1 {= | <> | < | > | <= | >=} Expression2) λλ CBool (Number)
Bool
Expression1, Expression2: λΉκ΅ν μμμ λ¬Έμμ΄ λλ μ«μ μμ λλ€. CBool ν¨μλ μμ΄ μΌμΉν κ²½μ° Trueλ₯Ό, κ·Έλ μ§ μμ κ²½μ° Falseλ₯Ό ꡬν©λλ€.
Number: λ³νν μμμ μ«μ μμ λλ€. μμ΄ 0μΌ κ²½μ° Falseκ°, κ·Έλ μ§ μμ κ²½μ° Trueκ° κ΅¬ν΄μ§λλ€.
λ€μμ CBool ν¨μλ₯Ό μ¬μ©νμ¬ Instr ν¨μλ₯Ό μ¬μ©νμ¬ κ΅¬νλ κ°μ νκ°νλ μμ λλ€. μ΄ ν¨μλ μ¬μ©μκ° μ λ ₯ν λ¬Έμ₯μ "and"λΌλ λ¨μ΄κ° μ‘΄μ¬νλμ§ μ¬λΆλ₯Ό κ²μ¬ν©λλ€.
Sub ExampleCBool
Dim sText As String
sText = InputBox("Please enter a short sentence:")
REM Proof(Β»andΒ«κ° λ¬Έμ₯μ λνλλ κ²½μ°)
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