Re: Better way to indicate a variable in doc

Subject: Re: Better way to indicate a variable in doc
From: dmbrown -at- brown-inc -dot- com
To: "TECHWR-L" <techwr-l -at- lists -dot- raycomm -dot- com>
Date: Tue, 22 Oct 2002 14:26:25 -0700

johanne -dot- cadorette -at- locusdialog -dot- com wrote:
> When there is a variable in the definition, it is represented by %s in the
> documentation. For example, "Port %s of %s is not answering calls;" in
> this case, the message sent to the administrator would read "Port 4 of 8
> is not answering calls"; or, "Your license expired on %s."

This is just a cut-and-paste from the code, where %s tells the I/O engine to expect a string of characters to go there. You might also see %d for an integer and other similar placeholders for variables. In some audiences, this is fine: for example, programmers will know exactly what is meant, and there's no need to do anything special.

In documentation for other audiences, you should find out what the variable represents and indicate it with a meaningful word or phrase. Your examples would look like this:

Port *portNumber* of *totalPorts* is not answering calls

Your license expired on *expirationDate*

The asterisks (*) indicate italics. I'd set the message in a monospace font and the variables in an italicized proportional font. This is a well established convention--note that I'm not saying universal, just well established--that your readers will understand.

This technique is particularly helpful with less verbose messages:

Unknown: *loginName*

Not found: *directoryName*

Try it!



N O W A V A I L A B L E !

HTML Indexer 4 is still the easiest way to create and maintain indexes
for web sites, intranets, HTML Help, JavaHelp, and other HTML documents.

Now with fully integrated cross-references, target frames and windows,
multiple-file output, "one-step accept" of default entries, and more!


Buy ComponentOne Doc-To-Help 6.0, the most powerful SINGLE SOURCE HELP
AUTHORING TOOL for MS Word. SAVE $100 on the full version and $50 on the
upgrade. Offer ends 10/31/2002 (code: DTH102250).

All-new RoboHelp X3 is now shipping! Get single sourcing, print-quality
documentation, conditional text and much more, in the most monumental
release ever. Save $100! Order online at

You are currently subscribed to techwr-l as:
archive -at- raycomm -dot- com
To unsubscribe send a blank email to leave-techwr-l-obscured -at- lists -dot- raycomm -dot- com
Send administrative questions to ejray -at- raycomm -dot- com -dot- Visit for more resources and info.

Previous by Author: Re: CVS and Word docs
Next by Author: Re: Do choosy mother mothers choose GIF?
Previous by Thread: Re: Better way to indicate a variable in doc
Next by Thread: Re: Better way to indicate a variable in doc

What this post helpful? Share it with friends and colleagues:

Sponsored Ads