This function attempts to add an element to the end of <aArray> and optionally assigns the value <xValue> to this new element.
If the addition succeeds, the length of the array increases by one and the function returns either the value <xValue>, _if one specified_, or NIL.
Note that the presence of the 2nd argument (or at least the comma next to the 1st one, in which case NIL is implied as xValue) is mandatory, even if a specific xValue is not meant to be simultaneously added, otherwise RTE occurs; in such a case, the effect is identical to _ASize(aArray, Len(aArray)+1)_.