convert to string - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Data Types : Strings : convert to string

convert/string

convert an expression to a string

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

convert(expr, string)

convert(expr, string, opts)

Parameters

expr

-

expression

opts

-

(optional) option name or equation of the form option = value where option is one of format, sourceformat, or targetformat.

Options

• 

format : string

  

The option behaves identically to targetformat, but is only valid when expr is not itself a ByteArray or string.

• 

sourceformat : string

  

A string corresponding to one of the file formats described in Formats. The input expr will be decoded using the specified format and the data returned as a string. If the format specified is not one for which a string is a valid output type, an error is issued.

• 

targetformat : string

  

A string corresponding to one of the file formats described in Formats. The input expr will be encoded in the specified format and the encoded data returned as a string.

Description

• 

The convert(expr, string) calling sequence converts the expression expr to a string.

• 

To convert a string to an expression, refer to the parse command.

Examples

converta,string

a

(1)

convertsinx2,string

sin(x^2)

(2)

converta+b+cd,string

c*d+a+b

(3)

Compatibility

• 

The convert/string command was updated in Maple 2022.

See Also

convert

parse

string

symbol

type/string