27.02.2017, 19:10
Hello,
i have problem with #define and replacing special characters in compile time
(from:
ě љ č ř ћ э б н й
to:
e s c r z y a i e)
in coplile time, NOT real time.
I have function PrintTest with constant string parameter
I try use define like this:
I try use define like this:
I try use define like this:
How to write define to replace this special characters?
Thanks for any help
i have problem with #define and replacing special characters in compile time
(from:
ě љ č ř ћ э б н й
to:
e s c r z y a i e)
in coplile time, NOT real time.
I have function PrintTest with constant string parameter
Код:
public OnFilterScriptInit() { PrintTest("pбpěp");//i need rewrite to: papep PrintTest("pбrб");//para PrintTest("jeћнљ");//jezis PrintTest("paraљutista");//parasutista PrintTest("mlйko");//mleko PrintTest("ћбdnб");//zadna //etc. many use 1 000 000 times in code. Wery hard for rewriting return 1; }
Код:
#define PrintTest("%0б%1") PrintTest(#%0a#%1) //for string "pбrб" replace "parб" NOT "para" what i need
Код:
#define PrintTest("%0ě%1") PrintTest(#%0e#%1) #define PrintTest("%0б%1") PrintTest(#%0a#%1) //for string "pбpěp" replace "papěp" NOT "papep" what i need. And in compile show error warning 201: redefinition of constant/macro (symbol "PrintTest("%0б%1")")
Код:
#define ě e //In compile show error 074: #define pattern must start with an alphabetic character
Thanks for any help