TIP: Click on subject to list as thread! ANSI
echo: quik_bas
to: DAVID WILLIAMS
from: BILL WHITE
date: 1998-03-15 17:22:00
subject: Old Folks

DW> I suspect there are a lot of people in this conference, many of them
DW> quite competent programmers, who neither know nor care about the
DW> Boolean  AND function! It exists, but it isn't usually *thought of*
DW> as a very  important aspect of BASIC. (True, on a lower level, the
DW> "logical" AND,  as in IF X=1 AND Y=2 THEN..., is really Boolean, but
DW> most people don't  think on that level, nor do they need to.)
     And yet, sometimes it would help them.  The
statement:
 IF x THEN
really means
 IF x0 THEN
     I have gotten into trouble by writing:
 IF x AND y THEN
Using the values you gave, x=1, y=2, this does not work
as I had expected.  It does NOT say:
 IF x0 AND y0 THEN
as one might think from the first example.  The first
time I had it happen, it took me quite a while to
realize that Boolean Algebra was being used:
      00000001
 AND  00000010
  is  00000000
The statement was indeed false when I was expecting
otherwise.  There's another way of writing that, of
course:
 IF x * y THEN
will be true if both are not equal to 0.  The Boolean
expression will compile smaller, I believe.
  FIDO: Bill White @ 1:135/110 (Miami)
 InterNet: bill.white@110.sunshine.com
 * SLMR 2.1a * When friends offer help, let them!
--- Maximus 2.01wb
---------------
* Origin: Miami Amateur Computer Club BBS/USR Courier V.E (1:135/110)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.