Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Mar 2002 01:43:05 -0500
From:      Brian T.Schellenberger <bts@babbleon.org>
To:        "Paul C. Boyle" <freebsdruns@yahoo.com>, "Mike Meyer" <mwm-dated-1015883642.71b976@mired.org>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: I need hack, I would like a clock like the xdaliclock but reads the time out in HE
Message-ID:  <20020307064306.799C2BA03@i8k.babbleon.org>
In-Reply-To: <200203070437.XAA13463@alpha.vaxxine.com>
References:  <200203061700.MAA11066@alpha.vaxxine.com> <15494.36857.673158.314313@guru.mired.org> <200203070437.XAA13463@alpha.vaxxine.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Wednesday 06 March 2002 11:38 pm, Paul C. Boyle wrote:
| Thank you for the kind reply Mike.
| I have been shown the elitist attude by others at times,
| and man I tell you its can bring a buy down.
|
| On March 6, 2002 04:54 pm, you wrote:
| > > minimal exposure to these.) I have looked a Python and found it a bit
| > > confusing not having to delare everything and aslo it has no unary
| > > opperator.
| >
| > All languages have unary operators - at the very least negate, both
| > loagical and arithmeatic. Most modern ones have a boolean negate as
| > well.
|
| My comment was't meant to knock Python. I have read about Python and
| very much like what I have read.
| Just to tell you where I am coming from. I have taken a ten week night
| class in C++ 2 years ago. This was my first experience with programming.
| This just gave me the basics like , looping, functions, arrays, pointers as
| such. Since coming to Freebsd unix I found the majority of things is done
| in C. So I picked up the book Teach yourself C in 21 Days. Things are
| different here but they do make sense.
| Now looking at Python books things are a lot differently done.
| like  how do you do a for loop as you would in C or C++.
|
|  for ( x=0: x < 10 ;  x ++ )
|
| Is the  ++  not the unary operator?

No, ++ is *a* unary operator, not *the* unary operator.  -- is another.  - is 
another.  ! is another.  ~ is another.  There are a bunch: a unary operator 
is any operator that takes a single operand, just as a binary operator is an 
operator that takes two operaands.    And a ternary operator is an operator 
that takes three operands.

(There is "a" ternary operator, though; of commonly-used languages, C is 
unique in having a ternary operator, and it only has one of them: the ? : 
operator.)

Python doesn't have pre- and post- inrement- and decrment?

Well, neither do most languages--they are pretty much a quirky C construct 
created, I suspect because they correlated to PDP-11 machine instructions 
(addressing modes), which has since infiltrated a number of other languages.

But the lack of same is hardly a big deal.  It'll cost you just a few 
keystrokes.

OTOH, I do rather like x += 1 -- I think it clarifies what's going on as 
compared to x = x + 1 . . . .




-- 
Brian T. Schellenberger . . . . . . .   bts@wnt.sas.com (work)
Brian, the man from Babble-On . . . .   bts@babbleon.org (personal)
                                ME -->  http://www.babbleon.org
http://www.eff.org   <-- GOOD GUYS -->  http://www.programming-freedom.org 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020307064306.799C2BA03>