Looking for LO 5.2 Basic lang & runtime lib doc

Adapting some inherited Basic code for LO 5.2.4 app macro environment, mainly but not solely for Calc. Have located ‘guide’ pages on LO and OO sites, but not a LO 5.x Basic language reference and not a runtime Basic library reference. Three immediate questions but do not answer them if you can point to competent doc:

A) Does LO 5.2 Basic syntax support declaring functions returning arrays and if so what is the function declaration syntax or workaround or private vs. public function limits? Compiler does not like syntax of “Function foo(arg() as some_type) as other_type()” which declares an array of other_type as the return type. An array can be a function arg type but not a return type? “Guide” docs are silent. Goes to how much reverse factoring of code I need to do if I cannot use arrays as function return types at least for Private functions within a Module scope.

B) Compact reference for library subs and functions available in the LO 5.2 Basic environment that is included with the LO base install not including the app-specific LO SDK libs.

C) For user-provided functions implemented in Basic for Calc, doc on the function calling interface Calc expects a user function to provide for the various app-level Calc datatypes (text, numeric, other?), the return types Calc expects, and how to indicate NA or VALUE errors.