I agree the PrintF syntax can be elegant for many purposes. Obviously C programmers like it, but IIRC they can’t easily concat bunches of variables easily like in Clarion. The formatting of some values like Date, Time, Hex are “goodies” that save code and produce better results.
Most of my debug is Label=Value multiple times
DB('UpdateAPTransProcess - AddToCksFile Vndr: '& PeTran:VendorAutoNo &' Src: '&PeTran:JrnlSrc &' CKNO: '& PeTran:CkNo &' ACCT: '& CLIP(ACTMST:AcctNo) &' AMT: '& PeTran:Debit &' REF: '&PeTran:RefNo)
So your way the 6 Labels and Variables would separate:
PrintD('UpdateAPTransProcess - AddToCksFile Vndr: %i Src: %z CKNO: %i ACCT: %s AMT: %f REF: %z', PeTran:VendorAutoNo, PeTran:JrnlSrc, PeTran:CkNo, ACTMST:AcctNo, PeTran:Debit, PeTran:RefNo)
For me coding Debug often variables are inserted, removed, rearranged, copied. That’s easier cut/paste/delete with the Literal=Variable next to each other.
There is A LOT of Debug left in the old code I work on, much in batch processes so 100s or 1000s. I would be concerned the code that runs inside PrintD() slowing it. There are many ANYs and the concat 1 byte at a time using ANY is slow hence string libraries. In reality it probably does not matter as CPUs are so fast.
PrintF() does look nice to create a Message() so you can focus on the complete message text and not have the text cluttered with concatenated variables. There are usually not as many variables and much more text. There aren’t 100s of Messages showing during a process like Debug. I am trying PrintF and will send you some thoughts.