PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Extracting strings
  • UNICODE and ANSI
  • Operating mode in GO mode and at run time
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Returns the ASCII code of specified character. The ASCII code used corresponds to the ANSI standard of Windows.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
ASCIICode = Asc("A")    // Returns 65
ASCIICode = Asc("Barbier")   // Returns 66
Syntax
<Result> = Asc(<Character String to Process>)
<Result>: Integer
Requested ASCII code (between 0 and 255).
Windows Mobile This code is included between 0 and 65535.
<Character String to Process>: Character, character string or buffer
Character whose ASCII code must be calculated. If this parameter corresponds to:
  • an empty string or an empty buffer, <Result> will be equal to 0.
  • a character string, <Result> will be equal to the ASCII code of the first character.
  • a buffer, <Result> will be equal to the ASCII code of the first byte.
WEBDEV - Browser code In this version, this parameter can only correspond to a character or to a character string.
Remarks

Extracting strings

Extracting a string (via the [[ and ]] operators) can be used to convert a character found anywhere in a string.
For example: "Asc(Str[[N]])" returns the ASCII value of Nth character found in the "Str" string.
Windows Mobile

UNICODE and ANSI

About 30 specific characters have a different ASCII code according to their format (UNICODE or ANSI).
Asc returns the ASCII code of a character in UNICODE format.
To find out the ASCII code of a character in UNICODE format, this character must be converted into ANSI (UnicodeToAnsi) before calling Asc.
For example:
Charact1 = Charact(128)     // Returns "€"
Charact2 = Charact(8364)      // Returns "€"
Code1 = Asc("€")            // Returns 8364
Code2 = Asc(UnicodeToAnsi("€"))     // Returns 128
Windows Mobile

Operating mode in GO mode and at run time

In GO mode (simulation on the development computer), when ASC is called, the ASCII code returned corresponds to the ASCII code of the character in ANSI format.
For example, running the following code:
Code1 = Asc("€")
  • in GO mode, this code returns 128.
  • at run time, this code returns 8364.
The differences between GO mode (simulator) and real use are presented in Differences between GO mode and real use.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
WEBDEV - Browser code WDJS.DLL
Java wd230java.jar
Linux wd230vm.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment