Diagramming syntax variants in C functions

Subject: Diagramming syntax variants in C functions
From: Andy -dot- Kubrin -at- tanner -dot- com
To: "Techwr-l (E-mail)" <TECHWR-L -at- lists -dot- raycomm -dot- com>
Date: Wed, 22 Sep 1999 17:42:31 -0700

Techwriters,

My company makes CAD software, which includes a user-programmable interface.
I'm looking for guidance on how to present variant functions in a reference
for these C-language calls. There's probably a convention for this sort of
thing, but I don't know what it is.

For example, a typedef was modified this year to allow for noninteger
orientation of objects. Should I use brackets to show the variant as in
Method 1, or should I just present two alternate syntaxes, as in Method 2.

METHOD 1

LTransform
typedef struct {
LPoint translation;
LOrientation[_Ex99] orientation;
LMagnification magnification;
} LTransform[_Ex99];

METHOD 2

LTransform
typedef struct {
LPoint translation;
LOrientation orientation;
LMagnification magnification;
} LTransform;
or

typedef struct {
LPoint translation;
LOrientation_Ex99 orientation;
LMagnification magnification;
} LTransform_Ex99;

I hope this doesn't sound impossibly nerdy. The question is really which
method programmers would be most familiar with, and which method they would
find easiest to read.

If anyone knows of any documentation I could look at for precedent, I'd
appreciate that also.

Thanks in advance.

Andy

Andy Kubrin
Manager, Documentation Group
Tanner Research, Inc. E-mail
andy -dot- kubrin -at- tanner -dot- com
2650 E. Foothill Blvd. Phone (626) 792-3000
Pasadena, CA 91107 Fax (626) 432-5705
http://www.tanner.com/eda/





Previous by Author: Re: Programmer/Writer?
Next by Author: Diagramming syntax variants in C functions
Previous by Thread: Writing System Requirement Specifications
Next by Thread: Re: Diagramming syntax variants in C functions


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


Sponsored Ads