PickBASIC / FlashBASIC

seq() function

.md

The seq() function converts any ASCII character to its corresponding numeric equivalent in the range 0 through 255.

Look up any code 0–255 in the Character Codes chart: the character, hex, binary, and the D3 marks (AM, VM, SVM).

Syntax

seq(ascii.character.exp)

Parameter(s)

ascii.character.exp Specifies the ASCII character to convert to its corresponding numeric equivalent in the range 0 through 255.

Description

This seq() function is the opposite of the char() function.

Any expression can be used as an argument, but all characters are ignored beyond position 1.

The seq of a null string ends up using the segment mark (x’ff’) end-of-string delimiter as the argument resulting in a value of 255.

Example(s)

This example stops when any control character is input.

input c,1
if seq(c)<32 then stop

Character to its ASCII code

print seq("A")   ;* 65

See also