Void function call

I'm not sure how much of a big deal this is, but when I do something akin to:
function this(%yes)
{
   if(%yes)
      return echo("Words");
}

It works, but it gives me a void function call that seems out of place.
It doesn't seem like a big deal other than if I use it a lot it would spam quite a bit, but other than that this is just curiosity.

Comments

  • Why not just...
    function this(%yes)
    {
       if(%yes)
          echo("Words");
    }
    
  • Like I said, just curiosity. Plus it would be like
    echo("This");
    return;
    

    And I like the one line better than that two line crap :-)
    Again, doesn't really matter.
  • echo doesn't generate output, therefore it is a void call. it merely prints something to the console.
  • If you want to return a function, use call();
    function this(%yes)
    {
       if(%yes)
          return call(echo,"Words");
       else
          return call(error,"No Words");
    }
    
Sign In or Register to comment.