Asc Function

๋ฌธ์ž์—ด ์‹์˜ ์ฒซ ๋ฒˆ์งธ ๋ฌธ์ž์— ๋Œ€ํ•œ ASCII(American Standard Code for Information Interchange) ๊ฐ’์„ ๊ตฌํ•ฉ๋‹ˆ๋‹ค.

๊ตฌ๋ฌธ:


Asc (Text As String)

๋ฐ˜ํ™˜ ๊ฐ’:

Integer

๋งค๊ฐœ ๋ณ€์ˆ˜:

Text: ์ž„์˜์˜ ์œ ํšจํ•œ ๋ฌธ์ž์—ด ์‹์ž…๋‹ˆ๋‹ค. ๋ฌธ์ž์—ด์˜ ์ฒซ ๋ฒˆ์งธ ๋ฌธ์ž๋งŒ ์˜๋ฏธ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

Asc ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํ‚ค๋ฅผ ๊ฐ’์œผ๋กœ ๋ฐ”๊ฟ‰๋‹ˆ๋‹ค. Asc ํ•จ์ˆ˜๊ฐ€ ๋นˆ ๋ฌธ์ž์—ด์„ ๋งŒ๋‚˜๋ฉด LibreOffice Basic์€ ๋Ÿฐํƒ€์ž„ ์˜ค๋ฅ˜๋ฅผ ๋ณด๊ณ ํ•ฉ๋‹ˆ๋‹ค. 7๋น„ํŠธ ASCII ๋ฌธ์ž(์ฝ”๋“œ 0-127) ์™ธ์—๋„ ASCII ํ•จ์ˆ˜๋Š” ASCII ์ฝ”๋“œ์—์„œ ์ธ์‡„ํ•  ์ˆ˜ ์—†๋Š” ํ‚ค ์ฝ”๋“œ๋ฅผ ๊ฒ€์ƒ‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ASCII ํ•จ์ˆ˜๋Š” 16๋น„ํŠธ ์œ ๋‹ˆ์ฝ”๋“œ ๋ฌธ์ž๋ฅผ ์ฒ˜๋ฆฌํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

Error codes:

5 ์ž˜๋ชป๋œ ํ”„๋กœ์‹œ์ € ํ˜ธ์ถœ์ž…๋‹ˆ๋‹ค.

์˜ˆ:


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

CHR

Please support us!