TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: All
from: Neil Heller
date: 1998-09-01 21:51:00
subject: A MATTER OF STYLE

I was busily programming away the hours the other day when the thought
struck me that perhaps the way I prefer to assign boolean values is far
from the norm im C/C++.  Am I way off the beaten path?  What's usual in
this situaiton?

Given a boolean:  foobool

For an easy example, suppose foobool will be true if variable intvar
(an integer variable) is less than 5 and false otherwise.  I would
write:

foobool = (intvar < 5);

This seems straight forward and easy to understand to me.  However
I've never seen this style used by another programmer.

 * KWQ/2 1.2i *

--- FLAME v1.1
* Origin: Port Chicago's Loading Dock - 510-676-5359 (1:161/204)
SEEN-BY: 396/1 622/419 632/0 371 633/260 267 270 371 634/397 635/506 728 810
SEEN-BY: 639/252 670/213 218
@PATH: 161/204 42 215/34 270/101 396/1 633/260 635/506 728 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™.