skill command to convert any datatype to string

V

vijayraj

Guest
Is there any skill command to convert any datatype to string??
 
On 02/14/14 17:03, vijayraj wrote:
Is there any skill command to convert any datatype to string??

Depends how intelligent you want it to be. If the "print representation"
is sufficient, you could use:

sprintf(str "%L" value)

or if you want to avoid having quotation marks around strings if it's a
string already, you could use

str=if(stringp(value) value sprintf(nil "%L" value))

Regards,

Andrew.
 
Thanks andrew.. I will go with the second one. It suits for me..

str=if(stringp(value) value sprintf(nil "%L" value))

thanks
vijayraj
 

Welcome to EDABoard.com

Sponsor

Back
Top