Alex
Member
|
Code Editor - Typecasting a Char8* variables
Codeeditor automatically inserts symbol L before each quoted line. How it can be switched off?
The matter is that I use sprintf() for formatting of numbers with a floating point
example: sprintf(buf, "FPS = %.1d", Time.fps())
and for an names insert at lines
example: sprintf(buf, scriptstring, PlayerName), where scriptstring = "Hello, %s!"
(This post was last modified: 01-06-2012 04:20 AM by Alex.)
|
|
01-06-2012 04:16 AM |
|
Driklyn
Member
|
RE: Code Editor - Typecasting a Char8* variables
Checkout Code Editor's documentation/wiki, more specifically: " Differences between Languages"
Code:
char8 c=8'a';
char8 *t=8"abcde";
* Notice the 8.
|
|
01-06-2012 07:51 AM |
|
rndbit
Member
|
RE: Code Editor - Typecasting a Char8* variables
or _wsprintf();
|
|
01-06-2012 10:36 AM |
|
Alex
Member
|
RE: Code Editor - Typecasting a Char8* variables
Thanks! The 8"abcde" works!
Though the _wsprintf() will be more safe for the multilingual application?
|
|
01-06-2012 10:50 AM |
|
Esenthel
Administrator
|
RE: Code Editor - Typecasting a Char8* variables
or don't use sprintf and use EE funcs:
S+"fps: "+TextReal(fps, 1);
|
|
01-11-2012 03:00 PM |
|
Alex
Member
|
RE: Code Editor - Typecasting a Char8* variables
It that I searched!
Thank you very much!
|
|
01-11-2012 03:28 PM |
|