Include % Sign within a string type variable through StringFormat() Function

Back to topics list To post a new topic, please log in or register
avatar
14
Vivs 2015.06.11 08:24
 

How can I include % in StringFormat() function?

I was trying this instruction to display % sign after the stopOut value:

string msg = StringFormat("\nA/C Stop-Out: %g %",stopOut);

But, this instruction is not displaying any result.  

avatar
Moderator
3206
angevoyageur 2015.06.11 09:12 #
 
%%
avatar
14
Vivs 2015.06.11 10:11 #
 
Thanks :)
avatar
13012
WHRoeder 2015.06.11 12:40 #
 
Vivs: How can I include % in StringFormat() function?
If you read the documentation, PrintFormat - MQL4 Documentation just above the flags section, it says:
If you need to output the percent sign in the format string, use the format specification %%.
Back to topics list  

To add comments, please log in or register