Isn't coding style, spacing included, client depedent? If they pay well, and are likely to bring you back:
// *********************************
// Function: someFunction
// Description: Does something complicated with the customer name
// Return Value: (String) Newly Modified Customer Name
// *********************************
function someFunction( string sCustomerName, // The customer's name
int iOtherArgument, // Description of other Argument
int iYetAnotherArgument)// Description of this Argument
{ // Parse customer name into first and last
string sCustomerFirstName = left(sCustomerName, pos(sCustomerName," ");
..
..
// Some other comment
someOtherVar= someOtherFunction(sCustomerFirstName);
..
return someOtherVar;
}
// *********************************
// Function: someOtherFunction
// Description: Does something with its argument
// Return Value: (vartype) description of the return value
// *********************************
function someOtherFunction( vartype vtDescriptiveVarName, // comment describing argument
vartype vtDescriptiveVarName2, // comment describing argument
{ // Comment describing code block
..
..
// Some other descriptive code blockcomment
someOtherVar= yetAnotherFunction(vtSomeVar);
..
return someOtherVar;
}
On the other hand, if the contract is low paying( or extremely high paying and the contractor is a pr*ck who just wants you in and out ASAP), something like this might be more appropriate:
function sF( string sCName, int iOA,int iYAA)
{ return sOF(left(sCN,pos(sCN," ")..);
}
function sOF(vartype vtNDVN,vartype vtNDVN2)
{ ..;..;return yAF( vtNDVN);
}
Spacing and comments are really for the maintenance programmer, not the original author.
__________________
Please login or register to view this content. Registration is FREE Free Directory Quality Relevant Content - No Backlinks required!
Last edited by cbwm; 02-16-2008 at 10:16 AM..
|