325 views
in System Integration by
Hello,

I'd like to pass a string to the method EwPrint, the idea is to format the string in EW , then passed the string via a native statement to the function EwPrint.

I get an error when compiling in GCC that the method EwPrint wants a const char* but gets a Xstring.

I assume the conversion is not automatic. How to handle that?

thanks

1 Answer

0 votes
by
 
Best answer

Hi Roccardo,

of course, you can use the function EwPrint() in order to print the content of a XString. Please use the escape sequence %S:

%S - works similar to %s with the difference that the operand affected by the operation is assumed to be a 16-bit zero terminated string. The escape sequence permits you to print contents of Embedded Wizard own XString strings. A conversion to ANSI string is not necessary.

I  hope this helps.

Best regards,

Manfred.

 

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

...