On Wednesday 20 November 2013 23:01:52 Marcos Douglas wrote:
> On Wed, Nov 20, 2013 at 1:01 PM, Martin Schreiber <mse00...@gmail.com> 
wrote:
> > Hi,
> >
> > '()' for procedure header and procedure calling is mandatory.
> > "
> > procedure noparams();
> > begin
> > end;
> >
> > procedure test();
> > begin
> >  noparams();
> > end;
> > "
>
> No, no, no...please!  :(
> I know that you want to make a language more ortogonal but exceptions
> could exist! If you do not have parameters, why I need use this '()'?
>
In order to show that it is a subroutine call. In FPC it is sometimes 
necessary anyway to distinguish address, value and call of procedure 
variables. Can you elaborate in more detail why you don't want to write '()'?

>
> > There will be no extra reserved name for functions, functions are defined
> > by ':' TYPE. Return values are supplied by 'return' statement. A 'return'
> > statement before 'end;' is mandatory.
> > "
> > procedure func(a: bool8): int32;
> > begin
> >  if a then
> >   return 123;
> >  end;
> >  return 458;
> > end;
> > "
> >
> > Opinions?
>
> I agree that not needs to exist procedure and function keywords, but
> if one them will be excluded then "procedure" keyword is the best
> choice.
> The most languages uses "function" so why MSElang can't uses that keyword
> too?
>
Because a 'function' always returns a value. C resolves the problem by 
the 'void' type, I don't like that approach. Oberon uses 'procedure' too.

Martin

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to