DataBasic Reference > Statements and Intrinsic Functions > S > SEQ Function

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

RealityV15.1Online Documentation (MoTW) Revision 7

SEQ Function (DataBasic) (m618703+seq_f.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

SEQ Function

Converts an ASCII or multi-byte character to its character code.

Syntax

SEQ(char{, charSize})

Syntax Elements

char The character to be converted.

charSize Optional. A positive integer in the range 1 to 6, specifying the size of the character (default, 1). This parameter is intended for future use with multi-byte characters.

Return Value

The decimal code that corresponds to the character char.

Comments

Reality does not currently support multi-byte characters; however, SEQ may be used for binary to decimal conversions, where charSize is the number of bytes in the binary field.

SEQ is the inverse of the CHAR function.

Examples

PRINT SEQ('I')

Prints the number 73.

DIM C(50)
S = 'THE GOOSE FLIES SOUTH'
FOR I=1 TO LEN(S)
C(I) = SEQ(S[I,1])
NEXT I

Places the decimal equivalents of the characters in string S into vector C.

RealityV15.1 (MoTW) Revision 7Comment on this topic