DEBUG Titles/Text, can they be dynamic?
![Francis Bauer](https://forums.parallax.com/uploads/userpics/045/nXHF5BBTMPYPD.jpg)
in Propeller 2
@cgracey (and fellow P2 enthusiasts)
So far I haven't found the right incantation to allow the displaying of a text string that comes from a variable/constant when using the various DEBUG modes.
I want to be able to create generic reusable routines that contains DEBUG statements that accepts string pointers so that you can specify for example different Titles or Text to be displayed.
I've found numerous examples showing fixed strings, how do you specify the use of variable string pointer?
It is probably simple, I'm just having difficulty finding the solution...
Comments
ZSTR_(address)
LSTR_(address, length)
Try these out.
@cgracey
Thank you for the quick response.
I did find
DEBUG(
LOGIC MyDisplay TITLE '#(v)')
- Characters are output using `#(value) notation.The above works with variables, but only character by character.
So far I've only been able to get debug(ZSTR_(string("help"))) to work, when I try to use a string pointer variable I just get gibberish.
Do the above commands work with the various graphical output forms of DEBUG?
Are there any examples you have of using these commands with variables?
EDIT: I was finally able to get the simple DEBUG output to display correctly using a string pointer with ZSTR, but I still haven't been able to get it work with setting the Title or other text for DEBUG SCOPE statements.
Time for bed, I will continue poking at it later during daylight hours...
Francis, I think you've got this working, but here is a program that makes ample use of dynamic strings in DEBUG statements, for anyone else who reads this thread and wonders:
Thank you, Chip. This is a great example for showing off dynamic strings in DEBUG statements.