790 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 - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...