TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Charles Angelich
from: Bo Simonsen
date: 2003-09-09 12:39:56
subject: Pointers

G'day Charles,

Sun 2003-09-07 19:34, Charles Angelich (1:106/2000) wrote to Bo Simonsen:

 CA>>> You have "if(function(parm)) ?" in your text -
the "?"
 CA>>> happens to have a 'meaning' within the C language that I
 CA>>> don't think you intended to refer to. 

 BS>> It was a question :-) Maybe i should put brackets around it. 

 CA> Typically lines of 'code' are separate from paragraphs of text.
 CA> It's much easier to read and undertand that way with fewer
 CA> misunderstandings. 

Agreed.

 BS>> Well look at that example, my code: 

 BS>> #define FALSE 0 

 BS>> #define TRUE !FALSE 

 BS>> if(func(parm) == TRUE) ... 

 BS>> then after complication it would be: 

 BS>> if(func(parm) == !FALSE) ... 

 BS>> Or? 

 CA> I'm not saying either would not be functional but there are
 CA> programmers who prefer that the source code is self-documenting as
 CA> well as functional. 

Some programmers just love to make their code so unreadable as possible for others.

 CA> Combining too much into one line of code can
 CA> make it difficult for others to comprehend why it was
 CA> constructed in that particular fashion. 

Indeed. Make the code so you can read it by your self.

Fx. some people understand this better:

test = test + 1;

than

test += 1; 

or 

test++;

Just a silly example.

Regards,
           Bo

--- timEd/Linux 1.11.b1
* Origin: The Night Express, Roennede DK (2:236/100)
SEEN-BY: 633/267 270
@PATH: 236/100 237/9 20/11 106/1 2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.