612 views
in Embedded Wizard Studio by
I am trying to avoid the following situation in Chora programming:
Using switch case statement for each index to find the corrosponding String::Index_X;
Index can go from 0-128, i want to load the string called Index_(index);

Is this possible? 
I expect this is not possible, but i am asking just in case, 
Thank you in advance!

1 Answer

0 votes
by
 
Best answer

Hello bjs,

if the number and the content of the strings is predetermined, the approach of using switch-case statement is more efficient. C compiler generates well optimized code for switch-case statements.Loading strings dynamically means that you have to take care of finding the right string and decoding/decompressing it. 

If loading the strings is essential, you will need to implement the desired operation in native code section. In such case see also the section Be careful when exchanging strings.

Does it help you further?

Best regards

Paul Banach

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

...