There are functions, like $firstalphachar, that allow the user to set a custom answer to return in case there is no proper answer (in this case, when the first character in the string is not a letter). In Picard’s embedded docs, the function is explained like this:
Returns the first character of `text`.
If `text` is not an alphabetic character `nonalpha` (or `#` if not passed) is returned instead.
I find this very confusing (but then I’m not a programmer). If I want the custom no answer to be ¡, should I write it as $firstalphachar(text,nonalpha="¡"?
Bob Swifts documentation explains it like this:
If `text` does not begin with an alphabetic character, then `nonalpha` is returned instead. If `nonalpha` is not specified, the default value “#” will be used.
It is much clearer, especially with the examples he gives, but if I read those instructions, I would simply write my function as “$firstalphachar(text,¡)”.
Are both documentations contradicting each other? Should one be improved? Bob’s explanation makes more sense to me.