Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

60%
+1 −0
Q&A How can I express this more clearly or concisely?

Edited based on comments: Given the following function declaration: f_get_vend_code(v_nut_id varchar2) return varchar2; I would write the description as follows: This function takes a nu...

posted 12y ago by Monica Cellio‭  ·  last activity 4y ago by System‭

Answer
#3: Attribution notice added by user avatar System‭ · 2019-12-08T01:54:36Z (over 4 years ago)
Source: https://writers.stackexchange.com/a/3849
License name: CC BY-SA 3.0
License URL: https://creativecommons.org/licenses/by-sa/3.0/
#2: Initial revision by (deleted user) · 2019-12-08T01:54:36Z (over 4 years ago)
Edited based on comments:

Given the following function declaration:

> f\_get\_vend\_code(v\_nut\_id varchar2) return varchar2;

I would write the description as follows:

> This function takes a nut ID (NUT\_ID) and returns the vendor's seller code (WINGNUT\_SELLER\_CODE) for this form. If NUT\_ID is not set (blah blah blah). If the function cannot find a valid seller ID it (does something).

Note: I'm using Java idioms because those are the ones I'm familiar with. I'm assuming that "takes (a parameter)" and "returns" are meaningful for your audience too; you should verify that by reading other API documentation for this language. I am also assuming that the values you originally used, e.g. NUT\_ID, are meaningful even though they don't appear in the signature; if that's not the case then I would omit them in the description.

Also note that I went beyond your original question to cover invalid parameters and error conditions. Good API documentation goes beyond what they can get from just reading the signature and tells them what they wouldn't be able to figure out otherwise.

#1: Imported from external source by user avatar System‭ · 2011-09-06T18:48:40Z (over 12 years ago)
Original score: 4