LibreOffice 7.1 Help
Returns the ASCII (American Standard Code for Information Interchange) value of the first character in a string expression.
Asc (แขแแฅแกแขแ แ แแแแ แช แกแขแ แแฅแแแ)
Integer
Text: แแแแแกแแแแ แ แกแฌแแ แแแแแแกแแฎแฃแแแแ. แแฎแแแแ แแแ แแแแ แกแแแแแแ แกแขแ แแฅแแแจแ แแ แแก แแแ แแแแฃแแ
Use the Asc function to replace keys with values. If the Asc function encounters a blank string, LibreOffice Basic reports a run-time error. In addition to 7 bit ASCII characters (Codes 0-127), the ASCII function can also detect non-printable key codes in ASCII code. This function can also handle 16 bit unicode characters.
Sub ExampleASC
Print ASC("A") REM แแแ แฃแแแแก 65
Print ASC("Z") REM แแแ แฃแแแแก 90
Print ASC("แแแก แแแแแกแ") REM แแแ แฃแแแแก 76, แ แแแแ แช แแ แแแ แแแแ แกแแแแแแ แแ แแก แแฎแแแแแแแแแ
End Sub