TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
Subject:RE: Lives there a Boolean integer? From:"Harry Bacheler" <hbacheler -at- geo -dot- census -dot- gov> To:"Mark L. Levinson" <markl -at- gilian -dot- com>, "TECHWR-L" <techwr-l -at- lists -dot- raycomm -dot- com> Date:Mon, 6 Mar 2000 15:05:25 -0500
Mark
I know nothing about C or Perl, in the context you are speaking.
However, I started in computers at the assembler level in 1970, and stayed
at that level for 17 years or so.
ALL COMPUTERS DEAL IN BOOLEAN ACTIONS, based on 'binary values', i.e., the
'bits' of a number, integer, character, or whatever.
In your case, if the function were to return either the single digit 2 or
the single digit 3 (and no other digit),
you would perform a Boolean action to determine if there was a match of one
or the other. (i.e., does it match one or the other, and make a decision
based on the result.)
I'll deal in detail only with the representation of the number set.
You could ask the "inguneers" how may values are 'stored' in an integer that
is one-positional?
( 0 - 9) is my bet.
"Logically" it is a Boolean decision, being either a "0" or a "1". It is at
the same time, a "binary" value.
Mathematicians have all sorts of names based on the 'number set', or "set
theory"
Binary ( base 2 ) ( 0 or 1 )
Octal ( base 8 ) ( 0,1,2,3,4,5,6,7 )
Decimal ( base 10) ( 0,1,2,3,4,5,6,7,8,9,10)
Hexadecimal ( base 16) ( 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F )
It is an "on/of" switch.
"pass/fail"
"positive/negative"
It is simplest decision point.
My take on it is that you are making a "go/no" decision, (Boolean decision',
based on a binary value, 0 or 1).
Harry M. Bacheler, Jr.
Consultant
VGS, Inc.
"The thoughts, ideas, and opinions expressed in my portion of this email
are mine and mine alone. They are not the thoughts, ideas, and/or
opinions of any past, present, or future employers, or any group that I
might belong to."
> -----Original Message-----
> From: bounce-techwr-l-20951 -at- lists -dot- raycomm -dot- com
> [mailto:bounce-techwr-l-20951 -at- lists -dot- raycomm -dot- com]On Behalf Of Mark L.
> Levinson
> Sent: Monday, 06 March, 2000 01:18 PM
> To: TECHWR-L
> Subject: Lives there a boolean integer?
> >
I'd like to hear from people who are familiar with
C and with Perl. I'm documenting a number of functions
that return the integer 1 to indicate success and the
integer 0 to indicate failure. Because these are the
only two values ever returned, I'm being encouraged
to refer to them as boolean values, and I'm
being told that there's no real confusion involved
because neither C nor Perl supports a true boolean
data type.
Should I stand on the principle that an integer
is not boolean? (I am not trying to make a
distinction between Boolean and boolean, and
I would be content not to cause a digression
on that topic.)
Mark L. Levinson
markl -at- gilian -dot- com
Herzlia, Israel