Welcome, Guest
Username: Password: Remember me
Discussions for our web site sessions, Articles, Gallery, Downloads, Chat, Wiki, etc
  • Page:
  • 1

TOPIC:

If then else, Error in website? 1 year 1 month ago #17456

  • Peter Heckert
  • Peter Heckert's Avatar Topic Author
  • Visitor
  • Visitor
www.pilotlogic.com/sitejoom/index.php/ab...-then-else-statement

elseif is not a Pascal keyword.
Pascal does not interpret non Nil and nozero values as true.
The examples dont compile.
It seems there is another language than pascal described here.

Please Log in or Create an account to join the conversation.

If then else, Error in website? 1 year 1 month ago #17457

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4501
  • Thank you received: 1096
Thanks
we fix typo
elseif( =>else if(
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

If then else, Error in website? 1 year 1 month ago #17458

  • Peter Heckert
  • Peter Heckert's Avatar Topic Author
  • Visitor
  • Visitor
Thank you and Happy new Year!

This statement in chapter 1. Syntax is also wrong:
"Pascal assumes any non-zero and non-nil values as true and if it is either zero or nil then it is assumed as false value."
Should read: Pascal assumes only boolean expressions or values as true or false everything else is syntax error..

And the brackets in if statements are allowed in Pascal, but are superfluous and not necessary..
Also wrong is this:
program ifelseChecking;
var
{local variable definition }
a : integer;
a is not a local variable (which is on stack) in this case, it is a global variable with static lifetime and is in Data section.

Please Log in or Create an account to join the conversation.

Last edit: by Peter Heckert.

If then else, Error in website? 1 year 1 month ago #17459

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4501
  • Thank you received: 1096
Thanks
Fixed
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

  • Page:
  • 1