Hi all, i know perfectly the NumtoStr, but i forgot the equivalent to print true/false.
could you help me?
Print true false [SOLVED]
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Print true false
Hi all, i know perfectly the NumtoStr, but i forgot the equivalent to print true/false.
could you help me?
Please explain.
Re: Print true false
Hy Tj,
i mean that normally i use Expert commentary to print my variables like:
Str=Str+" My_Var: "+NumToStr(My_Var,6)+NewLine;
i know that is possible instead of NumToStr to plot variable True/False but i forgot the command to put it in a string.
thanks
i mean that normally i use Expert commentary to print my variables like:
Str=Str+" My_Var: "+NumToStr(My_Var,6)+NewLine;
i know that is possible instead of NumToStr to plot variable True/False but i forgot the command to put it in a string.
thanks
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Print true false
Hy Tj,
i mean that normally i use Expert commentary to print my variables like:
Str=Str+" My_Var: "+NumToStr(My_Var,6)+NewLine;
i know that is possible instead of NumToStr to plot variable True/False but i forgot the command to put it in a string.
thanks
What is "plot variable True/False" ?
- ABC
- Posts: 722
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 410 times
- Contact:
Re: Print true false [SOLVED]
Hi waldem,
there is no equivalent like "TrueFalseToStr", but you can easiliy write a function with a string as return value and one input of type "truefalsesimple". Then you pass your boolean, evaluate if it's true or false and return the appropriate string that you want to see in either case. Then you can simply call the function in your print statements.
Besides that you can of course simply print the boolean.
The code
returns the following output:
so there might not even be a need for a conversion.
Regards,
ABC
there is no equivalent like "TrueFalseToStr", but you can easiliy write a function with a string as return value and one input of type "truefalsesimple". Then you pass your boolean, evaluate if it's true or false and return the appropriate string that you want to see in either case. Then you can simply call the function in your print statements.
Besides that you can of course simply print the boolean.
The code
Code: Select all
Print("True = ", true, "; false = ", false ) ;
Code: Select all
True = TRUE; false = FALSE
Regards,
ABC
Hi all, i know perfectly the NumtoStr, but i forgot the equivalent to print true/false.
could you help me?