toString not working in 7.8.4

to use toString() or toStr() in ignition 7.8.4 do we have to import anything??
i tried using it directly but it is throwing an error as “toString is not defined”…

Are you trying to use the toStr() and toString() expression functions in a Jython script? It’s important to realize that they are two entirely different concepts.

In Jython you would use the str() function as the equivalent.

thank you for reply,

i am using it in actionperformed script…the str() worked…but in ignition help manual there is nothing mentioned about using str(). it has mentioned toStr() and toString()…

The language you use when writing scripts is based on Python 2.5. str() is part of the standard library.

thanks for the reply…