About Store Forum Documentation Contact



Post Reply 
Code Editor - Typecasting a Char8* variables
Author Message
Alex Offline
Member

Post: #1
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
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #2
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
Find all posts by this user Quote this message in a reply
rndbit Offline
Member

Post: #3
RE: Code Editor - Typecasting a Char8* variables
or _wsprintf();
01-06-2012 10:36 AM
Find all posts by this user Quote this message in a reply
Alex Offline
Member

Post: #4
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
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #5
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
Find all posts by this user Quote this message in a reply
Alex Offline
Member

Post: #6
RE: Code Editor - Typecasting a Char8* variables
It that I searched! smile
Thank you very much!
01-11-2012 03:28 PM
Find all posts by this user Quote this message in a reply
Post Reply