Z
Zytan
Here you are, Zytan. A complicated and long piece of code for obtaining
J.V.Ravichandran, thanks for your amazing attempt, but, as Jon said,
can you show how it works, before I attempt all of that only to find
it doesn't do what I want? Basically, does it allow this:
int x = 5;
WriteInt(x);
And print the string "x = 5" ?
If so, I could make WriteFloat(), WriteBool(), etc., to allow for
others, that can easily be typed for a quick debugging session. One
function need not handle all types, since I can just make multiple
functions. The purpose is quick typing, and the result is an
unambigious string written out that says just what is going on.
I already have something that prints the method that calls the
function:
class MyClass
{
void MyFunc()
{
int i = 5;
WriteValue("i = "+i);
}
}
will print the string "MyClass.MyFunc(): i = 5"
Zytan
a simple value however, it fulfills your requirement. It will print
"i=123" or any variable that you may declare within a class.
J.V.Ravichandran, thanks for your amazing attempt, but, as Jon said,
can you show how it works, before I attempt all of that only to find
it doesn't do what I want? Basically, does it allow this:
int x = 5;
WriteInt(x);
And print the string "x = 5" ?
If so, I could make WriteFloat(), WriteBool(), etc., to allow for
others, that can easily be typed for a quick debugging session. One
function need not handle all types, since I can just make multiple
functions. The purpose is quick typing, and the result is an
unambigious string written out that says just what is going on.
I already have something that prints the method that calls the
function:
class MyClass
{
void MyFunc()
{
int i = 5;
WriteValue("i = "+i);
}
}
will print the string "MyClass.MyFunc(): i = 5"
Zytan