KiXtart Language Reference (Asc)

[ KiXtart  VBScript  Batch  AutoIt  HTA  PowerShell  Windows Command Lines  Other Command Line Utilities  ]


Asc  (Function)

Available from version 3.46 through the latest release.

Syntax
Asc (<character>)

Description
Returns the ASCII code of the character specified

Return Values
Numbers = 48 to 57
Upper Case Letters = 65 to 90
Lower Case Letters = 97 to 122

Example
The following example checks the ASCII value against a specified range that identifies the response as a letter (and not a symbol or number).

? "Please Choose A Letter: "
Get $Answer
If (ASC ($Answer) => 65 AND ASC($Answer) <= 90)
     OR (ASC ($Answer) => 97 AND ASC($Answer) <= 122)
     ? "Valid Selection"     
Else
     ? "Invalid Selection"
EndIf

Also see:
Abs  CDbl  Cint  Val  CStr  Round  Int  Fix  Rnd  SRnd  DecToHex  FormatNumber  


 
Portions taken from, The Start to Finish Guide to Scripting with KiXtart. Used by permission.
 
Have a correction, addition or suggestion on this? Please let us know!
Last Edited: 6/1/2004. This page has been viewed 3600 times. Unless otherwise specified, all information is (C) 2004-2007 iTripoli, Inc. All Rights Reserved.

Note: you can view this information right within ASE by right clicking any keyword and selecting "Help..."


Now In Print! 496 Pages of detail covering each and every command. Includes common problems, command alternatives and real-world examples throughout.
 
Click here for special 35% discount!



iTripoli prides itself on providing top notch customer service

Find answers or open a ticket to ask directly, when opening a ticket we will suggest relavant articles to help you get answers as quickly and accurately as possible. Visit our support center now!

Please visit our full support center to find answers quickly or submit questions or feedback.