Since ENDFUNC serves to terminate a function definition (which is started by the FUNC keyword), it should not appear before the FUNC keyword. Here is an example of a correct function definition:
func MyFunc default = sin() endfunc
See Also
Errors