Atmel AVR Microcontroller discussion group.
[AVR club] C or Basic? - Reza - Aug 16 10:26:26 2007
I saw a message about "C is better or Basic".
as a starting point maybe basic is good for programming. but C is a
middle level language and Basic is a high level one. maybe for simple
applications Basic is good enough, but for special cases C is almost
better. you can write most oprtimized code than Basic, feel friendlier
with micro using C than Basic. and in some cases that would be a
difficult thing to write a program with Basic, vs C. but in all cases
if you want to write efficient programs with maximum performance and
minimum requirements (ram, power, code size, etc) you have to use C
with some routines coded in assembly, with a good logic. that is best
one.

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] C or Basic? - David Kelly - Aug 16 13:20:53 2007
On Wed, Aug 15, 2007 at 07:53:03PM -0000, Reza wrote:
> I saw a message about "C is better or Basic".
>
> as a starting point maybe basic is good for programming. but C is a
> middle level language and Basic is a high level one. maybe for simple
> applications Basic is good enough, but for special cases C is almost
> better. you can write most oprtimized code than Basic, feel friendlier
> with micro using C than Basic. and in some cases that would be a
> difficult thing to write a program with Basic, vs C. but in all cases
> if you want to write efficient programs with maximum performance and
> minimum requirements (ram, power, code size, etc) you have to use C
> with some routines coded in assembly, with a good logic. that is best
> one.
With a good C compiler one will have almost nothing in assembly. There
will be no point or advantage in using assembly.
The only reason I see for BASIC is to hold the hands of those who are
afraid of C.
--
David Kelly N4HHE, d...@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
[AVR club] Re: C or Basic? - stevech11 - Aug 16 16:06:38 2007
--- In a...@yahoogroups.com, "Reza"
wrote:
>
> I saw a message about "C is better or Basic".
>
> as a starting point maybe basic is good for programming. but C is a
> middle level language and Basic is a high level one. maybe for simple
> applications Basic is good enough, but for special cases C is almost
> better. you can write most oprtimized code than Basic, feel friendlier
> with micro using C than Basic. and in some cases that would be a
> difficult thing to write a program with Basic, vs C. but in all cases
> if you want to write efficient programs with maximum performance and
> minimum requirements (ram, power, code size, etc) you have to use C
> with some routines coded in assembly, with a good logic. that is best
> one.
>
WARNING: OPINIONS EXPRESSED THAT MAY NOT BE "PC"...
In the context of 8 bit micros, one should not generalize about the
BASIC language as one does about C. This is because Basic for micros
varies greatly in how sophisticated it is, or isn't. This is not the
case for C - which is a reason that professionals use C.
Every BASIC for 8 bitters is dramatically different than competing
products. Some are not truly high level languages with proper
expression evaluation and function call parameter passing and modules,
and with object libraries.
For example:
ZBasic.net is a Basic compiler that's very high level, like MS's VB6.
Indeed, the code looks almost identical, to include structures and
user defined types. But it targets a virtual machine that's
preinstalled on the AVR (in the Flash). I have great admiration for
this product and have done many quick development projects with it, to
include time-sensitive things that use high interrupt rates. Downloads
very compact p-code for the VM via serial port.
FastAVR (Basic) - very good, but the author has effectively abandoned
it. Web site is still there.
Mikroelektronika's Basic for the AVRs looks very good. I've tried it
briefly.
BASCOM - is a very poor Basic, in my opinion. One cannot do structured
design and the syntax of that language is not commonplace - it's full
of unique proprietary schemes. And it lacks structures, proper
function parameters, and has a too-crude expression evaluator. Its
author seemingly has moved on to other endeavors. I may be wrong.
So Basic is not Basic is not Basic.
But then, ye ole Dartmouth BASIC that I used eons ago is nothing like
MS's Visual Basic 6 and it's peers. (VB 2005 is just not BASIC).
So, again, the inconsistency of, and the uncertain long term product
viability of these dialects of Basic are why good ones are great for
hobby stuff but can be very risky if used professionally; not so, C.

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )Re: [AVR club] Re: C or Basic? - Tom Becker - Aug 16 18:28:46 2007
> ... WARNING: OPINIONS EXPRESSED...
Danger, indeed!
There will be no satisfactory end to this thread and it will surely persist, unless we
deliberately do not reply with our own opinion based on our own experience - even if it is
understandably significant and therefore an important contribution to the thread.
Otherwise, we are each in peril of writing foolish things - now committed to public
storage, forever - like "... afraid of C".
Programming language bigots are very common in big iron; it's no surprise there are some
here, but let's leave them there. If you want to compare features, do it, like "C is
great because it can...". Leave the other guy's small brains or low bravery out of the
debate.
Tom

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
[AVR club] Re: C or Basic? - stevech11 - Aug 17 2:14:36 2007
But for newcomers, reading the viewpoints of a few people is helpful.
As long as the discussion remains civil!
--- In a...@yahoogroups.com, Tom Becker
wrote:
>
> > ... WARNING: OPINIONS EXPRESSED...
>
> Danger, indeed!
>
> There will be no satisfactory end to this thread and it will surely
persist, unless we deliberately do not reply with our own opinion
based on our own experience - even if it is understandably significant
and therefore an important contribution to the thread. Otherwise, we
are each in peril of writing foolish things - now committed to public
storage, forever - like "... afraid of C".
>
> Programming language bigots are very common in big iron; it's no
surprise there are some here, but let's leave them there. If you want
to compare features, do it, like "C is great because it can...".
Leave the other guy's small brains or low bravery out of the debate.
> Tom
>

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )