TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: andrew clarke
from: david nugent
date: 1996-04-20 02:40:08
subject: C beautifier programs

>> A problem I had with GNU indent is that it stuffed up the formatting
 >> of a switch statement that was nested.

 ac> I remember reading somewhere that it wasn't good
 ac> practise to nest a switch() statement within another.

Huh? Why not? It's perfectly valid to do so and if convenient.. well, why not?

 ac> I don't know if it is correct, or whether I actually
 ac> did read it, though.  So you might as well ignore what
 ac> I'm saying here.

Oh, ok. :-)

 ac> BTW, nested switch()es are pretty rare anyway, and you
 ac> can always fix them up later on if indent stuffs them
 ac> up.  ;-)

I've run indent over code with nested switches, and I don't recall any
particular problem. Could be a bug [:-)] in the version of indent I'm
using, however.

David

--- MaltEd/2 1.0.b6
* Origin: Unique Computing Pty Limited (3:632/348)
SEEN-BY: 50/99 78/0 620/243 623/630 632/103 348 360 998 633/371 634/388 396
SEEN-BY: 635/301 502 503 544 639/252 711/401 409 410 413 430 808 809 932 934
SEEN-BY: 712/515 713/888 714/906 800/1 7877/2809
@PATH: 632/348 635/503 50/99 711/808 809 934

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™.