From: David Brown on
CBFalconer wrote:
> John Devereux wrote:
> ... snip ...
>> Of course I comment the source code - I was just making the point
>> that you don't always want some "version" number written as a
>> comment in the C source file. There can be better ways to handle
>> revision control than typing a number into each source file.
>
> Look at the documentation for your version control system. There
> is almost certainly a way of automatically updating a version
> comment when the source is checked in. No pain whatsoever.
>

That is a "feature" supported by some version control systems, and not
others - and it is debatable whether it is a good thing. Some people
like it, others think the job of the version control system is to
provide safe and reliable storage for different versions of your code,
not to modify it on the fly.

http://subversion.tigris.org/faq.html#version-value-in-source
http://subversion.tigris.org/faq.html#log-in-source
From: werty on

Gov'ts subsidize , so they dont need to compete ,
so they make errors .
But the world has ARM competition , forcing ARM to
give more performance , thus ARM will beat out
all mcu/cpu in the next 4 years .
MicroChip-PIC , Zilog , Intel , will all be history .
Im not saying i approve , im saying its way too powerful
for any detours or surprises .
so if you talk 8051 or PIC , you wont have anyone
to talk to , in the future .


Im doin free software . Tiny Op System that loads
and assembles and debugs , all in 10K B8s .
I redefined Bytes and bits ! .... dont use U.C. nor L.C.
use only U.C. and place an 8 as suffix , to mean bytes .

Bytes = B8 , 32bits is B32 ...
bit number 1 thru 7 is [B1...B7] [B1-B7] [B1-7] .
B32.6 is the 6th bit . B32.6H is bit #6 = High
B32.6 GTE B32.2 "GreaterThanEqual"


My free OpSys , will not use text , one can program it
from softkeys , in seconds .
You learn it by displaying and dumping RAM and
registers , but images , not text .
The first image shows where each key is , that you
press , and what code frags , it links and makes them
pulse and throb as synapses in human brain do .

People will be forced to use it , because it clears
up everything in the software .


Anyone interested in joining ?
for starts . ill call it ForthRite ( a forth right method ).
If it is tiny , elegant , highly structured and intuitive ,
it may have a place in ForthRite ......and free to the public.
Since it has only images , it will be self Documenting .



















> Just another small 16-bitter. From Maxim, which sounds like never use it.
> It looks truly ghastly to program.
> Coding at low level is a task of compiler. BTW, do they provide decent
> tools for MAXQ?
>

From: Rich Grise on
On Sat, 03 Feb 2007 22:37:05 -0500, Robert Adsett wrote:

> Indeed, especially since some people have been known to produce
> functions that look like the standard functions but are either
> incomplete or behave slightly differently. (maybe we can call those
> homonym functions?)

In C++, that's called "Overloading".

If John thinks plain ol' C is "ugly", we should protect him from ever
seeing any C++ - He'd get apoplexy! ;-)

I disagree that C is "ugly", but as they say, "de gustibus non disputandum
est." (no accounting for taste.) :-)

But, even though there are uglier languages, I can see John's point -
from a hardware/assembly-level guy's POV, the 68xxx have always been
very pleasant to work with. I don't know exactly where it goes on the
"prettiness" scale, however. :-)

Cheers!
Rich

From: Rich Grise on
On Sun, 04 Feb 2007 11:27:03 +0000, Jan Panteltje wrote:
> On a sunny day (Sat, 3 Feb 2007 17:54:47 -0500) it happened Robert Adsett
>
>>> So, I am not shy with comments :-)
>>
>>I'm not saying you are. Just that the commenting in the example John
>>was given was poor. Unfortunately it appears the other examples on the
>>same site are worse. Not much wonder John dislikes C if that's what
>>he's got to go on.
>
> You are partly right in my view.
> If I buy a book in English (I am Dutch), can I require that plent of Ducth lines
> are inserted so I can read it if my English is broken?
>
> If you are going to do some reading of C files, do you not think you should _AT_LEAST_
> be able to read the language fluently?
> Even more when writing in C.
> C, written in the right way, other then if cryptic use of variables and functions in made,
> is very readable.
> I have worked myself throught tons of sourcefiles that had zero comments, something you
> learn when using open source.....
> Sometimes comments just distract.

The worst are comments that don't tell you anything, usually caused by
some supervisor ordering a bunch of code grunts, "Your code WILL be
commented!" and you get this:

LABEL1: MOV BP,SP ; move the contents of the stack pointer to the base
; pointer register

Another major complaint I've heard is about "programmers" who comment in
jive.

And so on. I'm sure you get the point. :-)

Cheers!
Rich

From: Vladimir Vassilevsky on


Rich Grise wrote:

> The worst are comments that don't tell you anything, usually caused by
> some supervisor ordering a bunch of code grunts, "Your code WILL be
> commented!" and you get this:
>
> LABEL1: MOV BP,SP ; move the contents of the stack pointer to the base
> ; pointer register
>
> Another major complaint I've heard is about "programmers" who comment in
> jive.

I have seen the comments like "I don't know why, but this variable
should be set to 1, otherwise it doesn't work..."

Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

http://www.abvolt.com