Description:
'Declare' statements in a stored procedure/function 'body' have an order restriction (as documented in section 18.2.8).
This information is not mentioned/referance in the create procedure/function sytax page (18.2.1) that regarding the 'routine_body', only states "Valid SQL procedure statements or statements".
Users are likely to create procedres after reading 18.2.1 (but not continuing all the way to 18.2.8) and as such not be clear as to why their create statements fail.
How to repeat:
Read the above sections in the manual
Suggested fix:
Add a referance in 18.2.1 to the order restriction of 'declare' statements and referance 18.2.8

[23 Oct 2005 2:33]
Paul Dubois

Users might wonder why their routine creation statements
fail for any number of reasons, not just declaration errors,
if they don't bother to read the rest of the chapter.
I'll add a more general exhortation about reading the other
sections in the chapter.