Asc

From AutoIt Wiki

Jump to: navigation, search

Asc returns the ASCII code of a character. Adapted from AutoIt docs.

Contents

Syntax

Asc("char")

Parameters

charAny valid ASCII character.

Return Value

Returns the ASCII code for char. Strings return the value of the first character.

Example

$code = Asc("A")  ; "A" = 65
If $code = 65 Then
  MsgBox(0,"ASCII code for A is ", $code)
Else
  MsgBox(0,"Why isn't A = 65?", $code)
EndIf

Related Functions

AscW Chr ChrW

Personal tools