v 1.1 boolean operators

Beta Testing discussion on mikroPascal PRO for 8051.
Post Reply
Author
Message
janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

v 1.1 boolean operators

#1 Post by janni » 02 Oct 2008 18:10

Help says: "Boolean operators conform to standard Boolean logic and return either TRUE (all ones) or FALSE (zero)". But assigning result of boolean operation to a byte variable produces 0 or 1, rather than 0 and 255 (like in bytevar:=a>1; ). Do I miss something here?

piort
Posts: 1379
Joined: 28 Dec 2005 16:42
Location: Laval,Québec,Canada,Earth... :-)
Contact:

#2 Post by piort » 02 Oct 2008 19:02

hi janni,
not sure but with 8051 you have a bit type... so boolean are bit not byte... that save some memory if doing well ;-)

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

#3 Post by janni » 03 Oct 2008 12:43

Sure, there are 128 bits to use, and no boolean type. Only the help says what it says, so I assumed that using byte (or word) variable in logical expressions is possible. If not, then the help file should be corrected.

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

#4 Post by TurboProgger » 04 Oct 2008 18:51

Hi all,
I'm testing 8051 Pascal v1.1 eval, and found out, that disabling "highlight" begin..end and brackets don't work. If you remove the checkmark and press "Applay" nothing will happen to the code. Next call to Tools->Options-Editor Settings will bring back the checkbox checked...

Even though it's a great work - go on wth that.

User avatar
marko.ziv
mikroElektronika team
Posts: 531
Joined: 06 Dec 2007 10:11
Contact:

#5 Post by marko.ziv » 09 Oct 2008 08:37

Hi,

we were able to verify this, our IDE developers have been notified of this,
and it will be corrected. Good catch.

Best Regards

Spacetime
Posts: 10
Joined: 02 Jul 2007 13:16

#6 Post by Spacetime » 26 Oct 2008 17:06

AFAIK Ord (True) equals to 1, so assigning a boolean variable to a byte variable should assign 0 or 1.

In Turbo Pascal there was also a ByteBool type which was true for any value except 0.
turbo51.com - [url=http://turbo51.com]Free Pascal compiler for 8051[/url]

Post Reply

Return to “mikroPascal PRO for 8051 Beta Testing”