Consultor Eletrônico



Kbase P13498: Compiler accepts erroneous code in procedure calls with mismatching parenthesis
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   02/12/2008
Status: Verified

SYMPTOM(s):

Compiler accepts erroneous code in procedure calls.

List of parameters contains one parenthesis close (")") too many. Example: RUN CalledProc ("Parameter1" , "Parameter2" ) , "Parameter3").

Compiler does not raise any errors

At runtime, one or more of the following may occur depending on the exact RUN statement:

Compile-time arguments cannot be used with PERSISTENT RUN. (3444)

Compile time arguments may not be passed to an internal procedure. (5534)

** "<file-name>" was not found. (293)

** Unable to understand after -- "<string>". (247)

** Invalid statement. (254)

** <program> Could not understand line <number>. (198)

FACT(s) (Environment):

Progress 9.x
OpenEdge 10.x
All Supported Operating Systems

CAUSE:

Enhancement Request# 0000003846

CAUSE:

This is expected behavior.
The compiler accepts compile-time arguments to a RUN statement to allow for flexible on-the-fly compiling.
It will see the bad code as such arguments and ignore it.

FIX:

The Enhancement request is to provide a way to disable support for compiling on-the-fly, which would also include disallowing compile-time arguments on RUN statements in precompiled r-code.

This Enhancement has not been implemented in the product.

Partial workaround:

Always qualify parameters with the parameter type. (INPUT / OUTPUT / INPUT-OUTPUT). The compiler recognizes these as keywords, and raises error 349 if one is found where it isn't expected.
This will cause a compile-time error in the right location, even if it is not expected message.