From owner-freebsd-hackers Wed Mar 6 22:43:32 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mail7.nc.rr.com (fe7.southeast.rr.com [24.93.67.54]) by hub.freebsd.org (Postfix) with ESMTP id 01A9537B428 for ; Wed, 6 Mar 2002 22:43:23 -0800 (PST) Received: from i8k.babbleon.org ([66.57.85.154]) by mail7.nc.rr.com with Microsoft SMTPSVC(5.5.1877.687.68); Thu, 7 Mar 2002 01:43:15 -0500 Received: by i8k.babbleon.org (Postfix, from userid 111) id 799C2BA03; Thu, 7 Mar 2002 01:43:06 -0500 (EST) Content-Type: text/plain; charset="iso-8859-1" From: Brian T.Schellenberger To: "Paul C. Boyle" , "Mike Meyer" Subject: Re: I need hack, I would like a clock like the xdaliclock but reads the time out in HE Date: Thu, 7 Mar 2002 01:43:05 -0500 X-Mailer: KMail [version 1.3] Cc: freebsd-hackers@FreeBSD.ORG References: <200203061700.MAA11066@alpha.vaxxine.com> <15494.36857.673158.314313@guru.mired.org> <200203070437.XAA13463@alpha.vaxxine.com> In-Reply-To: <200203070437.XAA13463@alpha.vaxxine.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20020307064306.799C2BA03@i8k.babbleon.org> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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