Returnvalue from Method with Name?

Heyho,

would you guys maybe be interessted in the idea to define methods which have return types, also to give the method a return Name, like:

method CalcSomething: int32(someResultName);   
begin
  //do stuff here....
    someResultName := (10 * 3.14) div GetValue
end;

Now some would maybe say, why do you Need this, when you can give your method a good Name, which say what it Returns, but honestly, I had seen a lot of functions from different developers and also some of mine, which does some complicated stuff and you directly present the returnname always in the method-head!

And the idea ofc would be, that when you just look at the declaration, you can imediately see, what it takes for Input and what it gives back as Output!

Would like to hear your opinions :stuck_out_tongue:

i don’t see this, sorry.

Ok, no dilema, wanted just to ask :slight_smile:

1 Like

This is what XML comments are for.

1 Like