A pretty quasi-bug gift for your anniversary

General discussion on mikroPascal PRO for AVR.
Post Reply
Author
Message
Olso
Posts: 20
Joined: 22 Feb 2013 20:49

A pretty quasi-bug gift for your anniversary

#1 Post by Olso » 19 Jun 2014 10:56

Hello ME,

Congratulations on your anniversary! :)

And here's a birthday gift in the form of a dainty quasi-bug:

  procedure Quasi_Bug;
    var b: boolean;
  begin
      b := true;
      if b and not then b := false;      // -> b = false, => "not " = true
  end;

Like what, the negation of an unsaid is always true... :idea:
Or how to solve 8) the kripkenstein's problem unreservedly!

Have a good philosophical day,

Olso

TurboProgger
Posts: 66
Joined: 04 Oct 2008 18:39
Location: Germany

Re: A pretty quasi-bug gift for your anniversary

#2 Post by TurboProgger » 20 Jun 2014 21:39

Code: Select all

if b and not then b := false;
This is wrong Pascal Syntax.

There must follow an argument right after the not statement, maybe in brackets.

I am wondering, why the compiler does accept this without telling a missing boolean variable...

Anyway, this is mikroPascal :-)

Olso
Posts: 20
Joined: 22 Feb 2013 20:49

Re: A pretty quasi-bug gift for your anniversary

#3 Post by Olso » 06 Jul 2014 17:54

Code: Select all

if b and not then b := false;
This is wrong Pascal Syntax.
And wrong for all well formed syntactic langage.
There must follow an argument right after the not statement, maybe in brackets.
Of course.
I am wondering, why the compiler does accept this without telling a missing boolean variable...
This is the question... :mrgreen:
Anyway, this is mikroPascal :-)
But if it's just that his only bug ( :wink: ), it is easily forgiven!

Post Reply

Return to “mikroPascal PRO for AVR General”