|
Mid | ||
ASCII_Code = Mid(InputString$, CharacterPosition) | ||
Parameters: InputString$ = The string you want to read the ASCII values from CharacterPosition = The position of character you wish to query from the input string |
||
Returns: ASCII_Code = The ASCII code the represent this character |
||
The Mid() function allows you to grab the ASC II value of any character from within the InputString$ FACTS: * Mid() returns the ASC II value of a character. It's a short cut for the following ThisChr=asc(mid$(InputString$,Pos,1)) Mini Tutorial: Examing the ASC II values within a string is normally done by using the MID$() function to grab a single character and then converting the returned character to it's ASCII value using the ASC function. So Mid() is really shorthand for that.. I.e. Here's how we used do this.
In this mini example, both loops step through string number$, grabbing each character and then displaying it's ASCII value. The mid() is just a little cleaner for what is fairly common process. So mid() is a shortcut. Sample output
|
Related Info: | ASC | Left$ | Mid$ | Right$ | Val : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |