HP Forums

Full Version: Debugging using PRINT statements
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It's quite useful to sometimes put lines like
Code:
PRINT("Var="+var);
into a program to see what is happening.

This is great except for when var is a list, e.g. {1,2,3}, because then the output is
Code:
{"Var=1","Var=2","Var=3"}

Has anyone found a simple work-around that prints the list as a list? Or even a way of getting PRINT() to not start a new line each time?
I think
Code:
PRINT("Var="+STRING(var));
should do it?
(12-19-2018 04:07 AM)Jacob Wall Wrote: [ -> ]I think
Code:
PRINT("Var="+STRING(var));
should do it?

Yes, of course. It works.
Cheers. I thought I'd tried that and got the word "STRING" repeated - must have had a mis-placed double quote. Ooops.
Reference URL's