Recent

Author Topic: language sintax  (Read 2450 times)

jctuga

  • Newbie
  • Posts: 4
language sintax
« on: January 05, 2014, 01:48:36 pm »
this one may seems a strange question , but I´m very new to Free Pascal.
why in some functions like 'Form1.Showmodal;' there is no need of brackets ( Form1.showmodal() ) as it happens in other languages like java and c# ?

Thanks

Giu

  • Full Member
  • ***
  • Posts: 131
Re: language sintax
« Reply #1 on: January 05, 2014, 02:01:35 pm »
this one may seems a strange question , but I´m very new to Free Pascal.
why in some functions like 'Form1.Showmodal;' there is no need of brackets ( Form1.showmodal() ) as it happens in other languages like java and c# ?

Thanks

In Object Pascal, it's not mandatory to use brackets calling a procedure thath doesn't needs parameters.

jctuga

  • Newbie
  • Posts: 4
Re: language sintax
« Reply #2 on: January 05, 2014, 02:09:34 pm »
Thank Giu

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: language sintax
« Reply #3 on: January 05, 2014, 03:02:44 pm »
@Giu: In [Object] Pascal, it's already optional since the first time Pascal emerged from Prof. Wirth's brain :)

 

TinyPortal © 2005-2018