Asc Function (BASIC)

λ¬Έμžμ—΄ μ‹μ˜ 첫 번째 λ¬Έμžμ— λŒ€ν•œ ASCII(American Standard Code for Information Interchange) 값을 κ΅¬ν•©λ‹ˆλ‹€.

Syntax:


Asc(string) As Long

Return value:

Long

Parameters:

string: Any valid string expression. Only the first character in the string is relevant.

Asc ν•¨μˆ˜λ₯Ό μ‚¬μš©ν•˜μ—¬ ν‚€λ₯Ό κ°’μœΌλ‘œ λ°”κΏ‰λ‹ˆλ‹€. Asc ν•¨μˆ˜κ°€ 빈 λ¬Έμžμ—΄μ„ λ§Œλ‚˜λ©΄ LibreOfficeDev Basic은 λŸ°νƒ€μž„ 였λ₯˜λ₯Ό λ³΄κ³ ν•©λ‹ˆλ‹€. 7λΉ„νŠΈ ASCII 문자(μ½”λ“œ 0-127) 외에도 ASCII ν•¨μˆ˜λŠ” ASCII μ½”λ“œμ—μ„œ 인쇄할 수 μ—†λŠ” ν‚€ μ½”λ“œλ₯Ό 검색할 수 μžˆμŠ΅λ‹ˆλ‹€. ASCII ν•¨μˆ˜λŠ” 16λΉ„νŠΈ μœ λ‹ˆμ½”λ“œ 문자λ₯Ό μ²˜λ¦¬ν•  μˆ˜λ„ μžˆμŠ΅λ‹ˆλ‹€.

Error codes:

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

Example:


Sub ExampleASC
    Print ASC("A") REM returns 65
    Print ASC(string:="Z") ' returns 90
    Print ASC("Las Vegas") REM returns 76, since only the first character is taken into account
End Sub