Note that there are some explanatory texts on larger screens.

plurals
  1. PONaming a New C API
    primarykey
    data
    text
    <p>This might not be the ideal place to ask this question, but I'm really at a dead end and don't know where else to ask (suggestions would be appreciated).</p> <p>I'm trying to come up with a name for 4 new API's for my company's C Library.</p> <p>These API's are being added to an existing set, so they have to match an already made pattern, which limits my choices.</p> <p>What all of the API's (existing and new) do is allow the user to get/set the value string or nonstring variables used in a program. </p> <p>The way mine are different is that they allow you to get the value using the name of the variable, as apposed to already existing methods.</p> <p>Here is what I currently have:</p> <pre><code>VariableGetValueString VariableSetValueString VariableGetValue VariableSetValue </code></pre> <p>The only problem with this, is that it does not make it clear that it uses the NAME of the variable. I cannot think of a non-cluttered sounding name that makes this clear to the customer. </p> <p>Preferably, there should be nothing removed from the names, as it matches the patterns of the other API's (which do not explicitly state their retrieval methods in their names, though this one should, for extraneous reasons).</p> <p>Any help is appreciated, and though I know there is no definitive answer, I will obviously accept the one that fits the best.</p> <p>Sorry again if this is a poor place to ask the question, I would love suggestions of a more appropriate place if there is one.</p> <p>EDIT:</p> <p>Some existing API names are:</p> <pre><code>VariableGetTaskString VariableGetTask VariableGetGlobalString VariableGetGlobal </code></pre> <p>Along those lines. <code>Task</code> and <code>Global</code> refer to the scope of the variable. They weren't named very well in the first place, which makes my job more difficult, but they cannot be changed because customers have grown used to them and the changes would break old programs. I didn't include these initially because of how little help they offer (in my opinion).</p> <p>The parameters of each API will make it obvious to the customer what each one does, but it would be preferable for the name to do that as well. Thanks for your feedback.</p> <p>EDIT 2: </p> <p>Here is an example of a call into the API:</p> <pre><code>if(!VariableGetValueString(Handle handle, LPCSTR variableName, TaskID taskID, LPSRT value, DWORD bufferSizeinBytes) { //retrieve failed. } if(!VariableGetValue(Handle handle, LPCSTR variableName, TaskID taskID, PDWORD value) { //retrieve failed. } </code></pre> <p>Hope thats clear enough. Feel free to keep asking for more, I'll edit this all day. Thanks for the continued support.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload