move array size computation into separate function
check for illegal types in function and array declarations