Recent

Author Topic: More statements in "if then else" statement  (Read 13549 times)

Thaddy

  • Hero Member
  • *****
  • Posts: 14382
  • Sensorship about opinions does not belong here.
Re: More statements in "if then else" statement
« Reply #30 on: April 02, 2018, 03:30:41 pm »
No I wasn't reading fast enough...< to my self: >:D > Anyway the official documentation IS correct and the wiki needs a lot of cleaning up.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

Thaddy

  • Hero Member
  • *****
  • Posts: 14382
  • Sensorship about opinions does not belong here.
Re: More statements in "if then else" statement
« Reply #31 on: April 02, 2018, 03:34:28 pm »
No. It is always related to the inner if (the last if before any semicolon). If the compiler sees a semicolon it ends evaluation of that code block. Or generates an error if it can not evaluate the rest.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

Bart

  • Hero Member
  • *****
  • Posts: 5290
    • Bart en Mariska's Webstek
Re: More statements in "if then else" statement
« Reply #32 on: April 02, 2018, 04:00:28 pm »
PS. The semicolon wiki still has the error of mentioning a mandatory ; after end.
http://wiki.freepascal.org/;

I changed that page too.
Please review.

Bart

ASerge

  • Hero Member
  • *****
  • Posts: 2249
Re: More statements in "if then else" statement
« Reply #33 on: April 02, 2018, 07:21:37 pm »
For newbies.  :D
Checking the knowledge of two programmers, one is programming in C, other programming in Pascal. They show the ";" symbol and ask what it is?
Programmer in C says: this is an empty operator.
Programmer in Pascal says: this is two empty operators!

 

TinyPortal © 2005-2018