Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] OCaml wishlist
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Brian Hurt <bhurt@s...>
Subject: Re: [Caml-list] OCaml wishlist
On Wed, 22 Oct 2003, Jacques Garrigue wrote:

> Of course you have to be careful: you can shoot yourself in the foot
> with wrong indentation:
> 
>   let quit _ =
>     let icon = GMisc.image () in
>     if !test_id = 0 then (GMain.Main.quit (); false) else
>     icon#set_stock `DIALOG_QUESTION;
>     icon#set_icon_size `DIALOG;
>     [...]
> 
> In this case you're just going to jump over icon#set_stock...

This is a classic problem with dangling-elses, and you see it in C as 
well:

    if (x == 3)
        y = 7;
        z = 8;

Brian


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners