Forward function declaration <> function declaration

I notice that when the forward declaration of a function states the parameters but the function itself doesn't this gives an error in tablename rule. "field cha_SoortTabel must be qualified with tablename"
Is there a rule which checks this ugly construction and is there a fix for the tablename rule?


function CBDSchoon returns logical(input cha_SoortTabel as character) forward.

function CBDSchoon returns logical:
define variable cha_CBDZender as character no-undo.
define variable cha_CBDOntvanger as character no-undo.
...
return true.
end function.

Shiver...


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jurjen's picture

new rule forwardparams

I have added a new rule that looks if the parameters in the forward declaration are identical to parameters in the function implementation. You can download it to your contribs directory from:

http://websvn.oehive.org/filedetails.php?repname=prolint&path=/trunk/con...


jurjen's picture

fixed

Fixed the tablename rule and committed it to subversion, revision 420.
http://websvn.oehive.org/filedetails.php?repname=prolint&path=/trunk/pro...


jurjen's picture

For those who want try the

For those who want try the example in the original post: it does not trigger the "tablename" rule because the statement with the problem is replaced by a line with three dots.
Try this example instead:

function CBDSchoon returns logical(input cha_SoortTabel as character) forward.

function CBDSchoon returns logical:
    define variable cha_CBDZender as character no-undo.
    define variable cha_CBDOntvanger as character no-undo.
    cha_CBDZender = cha_SoortTabel.
    return true.
end function.