You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
If you have something similar and each type of data is handled (in the example only double and enum because its an example) and
you want to turn the value to text automatically , i.e. new value , instant format to text ,why is it not allowed to use the function for enumerations (EnumToString) when you create a double type instance of the class .
Can't it assume i'm handling it by types ?
Thanks
Edit , the opposite is allowed :
You can do that. Then just call the function in any class, struct, anywhere. Of course, just for enum and double. If you need other types like int or bool, will need add new functions for them.
For this case I have created a class "cToString". It's basically the same as what Samuel described. See the attached script for usage.
For debugging, I have collected some nice macros, and I'd like to share them with you:
To print an expression or variable along with its name
As the above, but prints with a nicer and more accurate formatting:
Demo
For printing enumeration values:
For debugging, I have collected some nice macros, and I'd like to share them with you:
To print an expression or variable along with its name
As the above, but prints with a nicer and more accurate formatting:
Demo
For printing enumeration values:
Nice , thank you @amrali
You can do that. Then just call the function in any class, struct, anywhere. Of course, just for enum and double. If you need other types like int or bool, will need add new functions for them.
this
and
For this case I have created a class "cToString". It's basically the same as what Samuel described. See the attached script for usage.
this are the solutions
It appears if you place the double (to text) before the template (to text) the editor is okay with it because it comes first .(for these 2 types , i will test will all others)
@Samuel Manoel De Souza
@Petr Nosek
Thank you very much .
I will go through with catching all the possible enum ints , for the fun of it , but your suggestions seem to be the solution.
[concerning the enumapper - the original issue is solved]
There are some undocumented enumerations among the misscounts of course
for instance in ENUM_ACTIVATION_FUNCTION there is no AF_PRELU in the docs
or the ENUM_DATATYPE
or ENUM_TERMINAL_INFO_STRING
here are all the possible enum item values , excluding some ENUM_DX_FORMAT values and ENUM_GEMM .