Post Reply 
Debugging using PRINT statements
12-18-2018, 11:15 PM
Post: #1
Debugging using PRINT statements
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?
Find all posts by this user
Quote this message in a reply
12-19-2018, 04:07 AM
Post: #2
RE: Debugging using PRINT statements
I think
Code:
PRINT("Var="+STRING(var));
should do it?
Visit this user's website Find all posts by this user
Quote this message in a reply
12-20-2018, 03:28 PM
Post: #3
RE: Debugging using PRINT statements
(12-19-2018 04:07 AM)Jacob Wall Wrote:  I think
Code:
PRINT("Var="+STRING(var));
should do it?

Yes, of course. It works.

Guy R. KOMAN, hp 50G, hp Prime Rev. C
Find all posts by this user
Quote this message in a reply
12-21-2018, 10:30 AM
Post: #4
RE: Debugging using PRINT statements
Cheers. I thought I'd tried that and got the word "STRING" repeated - must have had a mis-placed double quote. Ooops.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)