Converting String to a Number

In CL, is it possible to take a number and convert it to a string? I’d like to take the result of lhs = ${parseEquation(input.latex).lhs} and compare it to a number.

Thank you.
JV

I don’t think you need the ${ } here, but regardless better to check latex than a string. Is this what you want?

lhs=parseEquation(input.latex).lhs    #this outputs latex
check= lhs='5'

check here will output true if the left hand side is 5.

OR converting lhs to a number

number= numericValue("${lhs}")

This is super helpful. Thank you, Daniel.

1 Like