Abs Function

숫자 μ‹μ˜ μ ˆλŒ€κ°’μ„ κ΅¬ν•©λ‹ˆλ‹€.

ꡬ문:

Abs (Number)

λ°˜ν™˜ κ°’:

Double

맀개 λ³€μˆ˜:

Number: μ ˆλŒ€κ°’μ„ ꡬ할 μž„μ˜μ˜ 숫자 μ‹μž…λ‹ˆλ‹€. 0을 λΉ„λ‘―ν•œ μ–‘μˆ˜λŠ” κ·ΈλŒ€λ‘œ ꡬ해지며 μŒμˆ˜λŠ” μ–‘μˆ˜λ‘œ λ³€ν™˜λ©λ‹ˆλ‹€.

λ‹€μŒμ€ Abs ν•¨μˆ˜λ₯Ό μ‚¬μš©ν•˜μ—¬ 두 κ°’μ˜ μ°¨λ₯Ό κ³„μ‚°ν•˜λŠ” μ˜ˆμž…λ‹ˆλ‹€. μ–΄λ–€ 값을 λ¨Όμ € μž…λ ₯ν•˜λ“  상관이 μ—†μŠ΅λ‹ˆλ‹€.

Error codes:

5 잘λͺ»λœ ν”„λ‘œμ‹œμ € ν˜ΈμΆœμž…λ‹ˆλ‹€.

예:

Sub ExampleDifference

Dim siW1 As Single

Dim siW2 As Single

    siW1 = Int(InputBox("Please enter the first amount","Value input"))

    siW2 = Int(InputBox("Please enter the second amount","Value input"))

    Print "The difference is "; Abs(siW1 - siW2)

End Sub