lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> If that is the intention could I suggest that it either specifies that
> an acceptable index is a pre condition of the function or changing you
> words.
>  "If the value at the given acceptable index is a full userdata, returns
> its block address. If the value [at the given acceptable index] is a
> light userdata, returns its pointer. Otherwise [that is, both cases
> are false and the index is acceptable], returns NULL."

Or a more concise ending would be "On other acceptable indices returns
NULL". So it doesn't say a word about what i does on unacceptable
index.
Or write in the beginning the precondition: "The index must be acceptable".

This kind of a bit confusing "Otherwise" expressions is not limited to
that paragraph tough. So yes from the context it gets clear what is
meant.
E.g. compare it to this:
"Otherwise returns 0. Also returns 0 if any of the indices are non valid."
What one would express concise when not using "Otherwise": "In every
other case returns 0".
However, people tend to read only the parts that interest them, than
top to down.

I must say I'm also no native speaker, maybe its more clear for native
speakers? However, if several persons have problems understanding it,
albeit non-native, but language skill level C! or C2, it might be a
good reason for change. Like a Human-Computer-Interface-designer, if
one test person has some problem, no biggie, if several have the same
problem, you might consider adapting your interface.