From owner-freebsd-chat Mon May 19 13:44:12 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id NAA16375 for chat-outgoing; Mon, 19 May 1997 13:44:12 -0700 (PDT) Received: from X2296 (ppp6563.on.sympatico.ca [206.172.208.155]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id NAA16368 for ; Mon, 19 May 1997 13:44:08 -0700 (PDT) Received: from localhost (tim@localhost) by X2296 (8.7.6/8.7.3) with SMTP id QAA00221; Mon, 19 May 1997 16:41:15 -0400 (EDT) Date: Mon, 19 May 1997 16:41:15 -0400 (EDT) From: Tim Vanderhoek Reply-To: ac199@hwcn.org To: Luigi Rizzo cc: Bruce Evans , j@uriah.heep.sax.de, chat@freebsd.org Subject: Re: Variable initialization In-Reply-To: <199705191148.NAA04574@labinfo.iet.unipi.it> Message-ID: X-OS: FreeBSD 2.2 X-Mailer: Pine MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-chat@freebsd.org X-Loop: FreeBSD.org Precedence: bulk [note list change] On Mon, 19 May 1997, Luigi Rizzo wrote: > But anyways I was just trying to understand if there was something > fundamentally wrong in my preference of > > int a = 3; > > in place of > > int a ; > a = 3 ; The coding style must supplement the purpose of the code. Thus, some variables must be initialized separately from their declarations, while some must be initialized with their declarations. It all depends on wether the purpose of the variable is clarified by initializing with the declaration, or separately. Some variables just simply feel like they should be "int a=3;", some "int a = 3;", and some "int a;\n a=3;". IOW, those who say things such as YOU MAY NOT NEVER NEVER INIT AND DECLARE SIMULTANEOUSLY have simply become jaded after years of programming and have lost touch with the romantic inside of them. :) -- tIM...HOEk Whoever told you I had a .signature was lying.