basic.convertfn

Function/BASIC Program, Releases: AP 6.2 and R91

Converts characters.

Syntax

convert(variable,string.expression1,string.expression2)

Description

searches a given variable and replaces each occurrence of a character by another.
Any character designated in 'string.expression1' is replaced with the corresponding replacement character from 'string.expression2'. The correspondence is by column position in 'string.expression1' and 'string.expression2'.

If the length of 'string.expression1' is shorter than the length of 'string.expression2', all characters in 'string.expression2' beyond the length of 'string.expression1' are ignored.

If the length of 'string.expression1' is longer than the length of 'string.expression2', all characters in 'string.expression1' beyond the length of 'string.expression1' are deleted from the result.

See Also

Command Name Type Description
variables Definition store a number, string, file descriptor, or select list, and may change dynamically throughout the execution of the program.
basic.string.expression Definition An expression which evaluates to a string.
basic.statements Definition Definition of statements and functions.
basic.convert Statement Converts characters.
basic.exchange Function converts characters
basic.$options Statement Sets compatibility options for the BASIC compiler.

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.