439 views
in GUI Development by

Hello,
my Code is:

var int32 value = GetValue();
var string text = "The value is" + value; 

This code invokes a "bad operation" error. So i need a toString - method to transform my integer value into a string. Is there one in Chora?

1 Answer

0 votes
by

You can use the instant constructor for strings:

var int32 value = GetValue();
var string text = "The value is: " + string( value );

Additionally, you can define the number of digits by using a second parameter. For example, you can convert the value into a string with 5 digits:

var string text = "The value is: " + string( value, 5 );

For more information, please have a look into the Chora User Manual, chapter 7.7 Instant Constructors.

 

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...