INPUT-OUTPUT parameters - Forum - OpenEdge General - Progress Community
 Forum

INPUT-OUTPUT parameters

This question is not answered

Recently I found out that you can easily omit INPUT-OUTPUT option when you call a function or a method like that

FUNCTION Func RETURNS CHARACTER PRIVATE ( INPUT-OUTPUT yyy AS CHARACTER ):

END FUNCTION.

Func(x).

I think it's an awful thing in the language syntax.  It makes the code VERY confusing because when you see F(X)  you think X is immutable here but suddenly it turns out that it is mutable and it's a disaster!

It's OpenEdge 11.5.

All Replies
  • This has been discussed here before. I agree it's awful and dangerous.

    Chances to get this fixed however are almost zero.

    Architect of the SmartComponent Library and WinKit

    Consultingwerk Ltd.

  • I agree that this is not good.  We could add this on to our compiler OPTIONS feature - i.e., RequireExplicitParameterCompatibility (I know - the name is probably too long!  But you get the point.)

  • Laura Stern

    I agree that this is not good.  We could add this on to our compiler OPTIONS feature - i.e., RequireExplicitParameterCompatibility (I know - the name is probably too long!  But you get the point.)

    +1

    or +101 if I may.

  • You will be happy to know that this concept is already included under our future considerations for the COMPILER OPTIONS. No specifics on its ranking yet.
  • I'm looking forward to it! When's this option going to appear?

  • +1
    On the function/method definition it should be mandatory
    for the method/function/procedure call  we consider "input" as default and optional, the rest (output, input-output, …) should be specified
     
    I hope an RequireExplicitParameterCompatibility will be flexible enough for that behaviour.
     
    Kind regards/Met vriendelijke groeten,
    Carl Verbiest
     
  • This capability is on the Core Client team’s 12.0.0 enhancement list.  Once the team has a prototype of this functionality, we will share it with the Community via an 12.0.0 ESAP.
     
    To date, the Core Client team has provided as part of the first ESAP for 12.0.0 a change to the Compiler Option feature which was first introduced in 11.7.0.  It has now been augmented to associate a severity level (error or warning) with each compiler option you identify.  Our intent is back port this functionality to an 11.7 service pack.
     
    Thanks
     

    Evan Bleicher

    Sr. Development Manager

    Progress Software