The compiler happily accepts abbreviated keywords, file and field references, but occasionally this can result in strange and hard to debug errors (see also this post). Also, it grows sloppy programs.
It would be handy to have a startup option like '-strict' that prohibits this and raises an error when you try to compile a program that contains abbreviated things.
Optionally, the startup could be expanded with optional parameters (like the log-manager options). It could then look something like:prowin -db sports.db -strict schema,keywords
Implemented in OpenEdge 11.7.
+1, see also community.progress.com/.../compiler_should_prevent_methodsfunctions_without_return_statement for another candidate for this -strict compile option
See also this conversation:
Rather than a startup option, I'd like to see a compiler flag in the code
&STRICT-KEYWORDS , or something of that nature.
That means adjusting all code to include that flag? Not a fan of that...
@Chris : see the thread mentioned by Marko. In there, multiple levels of setting flags are discussed: at startup, at project level and in the individual sources
Warnings 12973, 5629 and all other combinations should become errors with strict compiling (in this case using "END METHOD" or "END FUNCTION" to end a PROCEDURE...).
Another one that should not compile:
PROCEDURE DummyProc. /* Note the . instead of : */
/* Do something */
This was debated and many ideas was raised in the thread pointed out by Marko Myllymäki in the second comment. community.progress.com/.../16733