From: Jonathan Kirwan
Subject: Re: Which basic compiler to buy?
X-Newsreader: Forte Agent 1.92/32.572
NNTP-Posting-Date: Wed, 11 Dec 2002 07:18:19 GMT
Organization: AT&T Broadband
Date: Wed, 11 Dec 2002 07:18:19 GMT
On Wed, 11 Dec 2002 03:46:19 -0000, "John Jardine"
>Jon, as you've got extensive experience of both languages you've caught me
>in a pincer movement and I shouldn't really have a leg to stand on. ;-).
Boy, is that a lead-in.
>You're right though, in that I am offering up propaganda (baseless or not).
>I try and redress a massive overbalance in the perception that the C offers
>all things to all men (and women). It's a small cry in the wilderness but I
>feel it should be heard.
I'd prefer seeing well-based points. There's plenty and more
than enough of what isn't to go around.
>There's also no way that I can supply a specific example, or demonstration
>of a problematic piece of 'C' that is better made in Basic, as I simply do
>not programme in C.
You were saying quite a bit about C, it seemed to me, for
someone who doesn't use it.
>(Much as I'd love to!),
Hmm. Is that 'love to program in C' or 'love to offer up some
>I just don't have sufficiently detailed knowledge to
>offer up some clever/underhand/scurrilous Basic-C comparison or
>demonstration, that could be argued over for an eternity.
I should hope to present such an eternal comparison. Were it
that I should be so smart, myself. Luckily, I'd be content to
just deal with smaller and more ephemeral comparisons.
Perhaps even just a fact or two.
>Basic and C comparisons do though regularly turn up in other 'language'
>NG's and as they are supplied by crafty programmers they argue a similar
>case far more elequently than I ever could.
You might track down one or two of the better ones to help make
your case. It's my general feeling that each language which
survives for a time has its relative value. BASIC included.
>I do though 'look in' regularly to see if the C language in its various
>forms has developed any 'clarity' and I do not have to be a programmer to
>discover more impenetratabilty more complexity, more 'structures' more
C++ has complexity. Some might consider it impenetrable, or at
least some aspects. But it's often just a matter of getting
your mind wrapped around some unfamiliar concept. Then it's
suddenly seen as valuable for some purposes. A nice thing about
C++ is that you can stay with rather prosaic syntax and
semantics, if you want to.
C has remained pretty simple overall, I think.
>But ... I am not a programmer. I'm just a hack designer of electronic kit.
>I use the programming purely as a tool to pursue an end. If a language does
>the job quickly and efficiently then I'm happy.
>I dislike parts of Basic. I also dislike the PIC machine code instruction
>set but both are simple and effective so I use them.
Okay. Programming is a tool to an end for me, as well. What
I'm interested in, personally, is physics and mathematics.
Programming lets me experiment.
>The OP though, asked about the worth of a C compiler for the PIC, as an aid
>to avoid writing lots of tedious PIC assembler.
>This narrows the field of interest away from PDPs, computer architectures,
>commercial programming, Unix, IBM, Apple, and even microsoft, to that of
>simply writing a few lines of text to perform relatively simple PIC micro
>related 'tasks' that will compile to a small PIC hex file using 30 different
>Over the past two years, I've inspected a number of sample programmes
>provided by PIC Basic and PIC C compiler suppliers and I still find that the
>supplied PIC C code samples are (in my opinion of course!) obtuse and
>unfriendly. Basic can be read by any programmer. C can only be read by a C
>Efficiency of final compiled code can only be discovered by the user. Yet
>again though I argue that simplicity of a PIC Basic source *will* translate
>into simplicity of PIC object code.
I've been programming PIC controllers since they first released
the PIC16C54..7 for general use (not in 1M-sized orders for rice
cookers, in other words.) That's more than a decade. I've used
assembly for the better part of all that time, but I've also
used C for large projects and stamp BASIC for small ones.
You feel strongly that the "simplicity of a PIC Basic source
will translate into simplicity of PIC object code." I'm not
arguing. Sometimes, BASIC can survive the translation quite
well. In fact, your example with an expression on an array
element 'lvalue' is a point I'd be willing to take.
But you were making some rather different points. And I don't
think I agree with your conclusions about C.
>I've one concrete example of C's abstruse nature. 18 months ago, I supplied
>an equipment to a consultant embedded systems engineer. He told me he
>couldn't immediately integrate it in to his main project as he was having
>problems with his control programme. Took a two further weeks before he
>cleared the problem (he'd already spent a week on it). He was programming in
>a C for the control micro (some 16 bit type) and was finally embarrassed to
>tell me that the problem was an erroneous "numeric type". That's 15 days at
>600UKP per day. He also told me that this kind of C problem was not
I'm sorry that happened to you. But I hope you'll grant that in
my 30 years of programming experience, I've seen my share of
such BASIC stories, as well. But I'm not shouting to the world
to avoid BASIC.