Asc Function

๋ฌธ์ž์—ด ์‹์˜ ์ฒซ ๋ฒˆ์งธ ๋ฌธ์ž์— ๋Œ€ํ•œ 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 ํ•จ์ˆ˜๊ฐ€ ๋นˆ ๋ฌธ์ž์—ด์„ ๋งŒ๋‚˜๋ฉด LibreOffice 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

Please support us!