[#BloombergLP-bslim-Printer-printOrNull-09] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslim.adoc[bslim]::xref:BloombergLP/bslim/Printer.adoc[Printer]::printOrNull :relfileprefix: ../../../ :mrdocs: Format the object at `address`, or print "NULL" if `address` is 0. == Synopsis Declared in `<bslim_printer.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> void printOrNull( TYPE const& address, char const* name) const; ---- == Description Format to the output stream supplied at construction the object at the specified `address`, if `address` is not 0, and print the string "NULL" otherwise, prefixed by the specified `name` if `name` is not 0. If `spacesPerLevel() < 0`, print on a single line. If `spacesPerLevel() >= 0`, indent by `(absLevel() + 1) * spacesPerLevel()` blank spaces. The behavior is undefined unless `TYPE` is a pointer type. == Specializations [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslim/Printer/printOrNull-0bf.adoc[`printOrNull<void*>`] | Print `address` as a hexadecimal pointer, prefixed by `name`. | xref:BloombergLP/bslim/Printer/printOrNull-06.adoc[`printOrNull<void const*>`] | Print `address` as a hexadecimal pointer, prefixed by `name`. |=== == Parameters [cols="1,4"] |=== | Name| Description | *address* | pointer to the object to format; "NULL" if null | *name* | attribute name printed before the value; omitted if null |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#