OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

office-formula message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [office-formula] Parameter naming conventions

I said:
>> So, here' s what I propose by "fiat":
>> * Types need to be in UpperCamelCase.
>> * Parameter names need to be lowerCamelCase.
>>    Try to use the same name between different functions for the same thing.
>>    Where practical, make them
>>    meaningful (indicating MEANING not type), e.g.,
>>    "basis" for date calculation basis (where 0=360-day year), etc.
>>    Use "x" for math functions taking one numerical parameter,
>>    "x" and "y" for math functions taking two numerical parameters.
>> Anyone have a crisis with this, please let us know.  
Andreas J Guelzow wrote:
> I think we should not force all math functions to use x and y as there
> variable names, but choose appropriate names:
> COMBIN(x;y) looks strange it should probably be COMBIN(n;k) since the
> arguments are integers. x;y looks like they are reals. Similarly the
> second argument of BETADIST should probably be the greek letter alpha
> rather than y.

I completely agree with you on the "don't require x and y"; I was 
primarily concerned
with the look (upper case? lower case?).  For parameter names, please 
use the
"most common conventional name".  Since  n and k are probably be the 
most conventional
names for the parameters of COMBIN, please use those.  As a guide, look at
the docs for various spreadsheets, and tend to prefer the "most common" 

I'm not so confident about using Greek letters for parameter names. 
Obviously it would
WORK, but many readers might have trouble with them.  Some applications
can't properly display them either, unfortunately.  Instead, I suggest
spelling out the Greek letter. E.G.:  BETADIST(... ; Number alpha)
Think that would work?

--- David A. Wheeler

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]