On Wed, 10 Mar 1999, Christian Loth wrote:
>> {
>> vars
>> do stuff
>> if {
>> more vars
>> } else {
>> more vars
>> }
>> }
>
>Agreed. But isn't this also subject to your initial criticism?
>If not, then I guess I didn't fully understand it...
Nope, that I'm fine with. You see a {, you know they're variables you use
only in the scope of the next }.
However, C++ lets you do this atrocity: (Which I think I spelled wrong, but
I'm in Windows, ick, right now doing taxes, triple ick.)
function()
{
int foo;
.. do something ..
int bar;
.. some more things ..
char *foo = strstr(this, that);
..more stuff...
if () {
.. more things...
int oh_I_need_a_variable;
...more stuff...
}
}
It may be handy to some people but you spend more time figuring out where a
variable came from than figuring out what is going wrong.
--
George Greer | Code from Erwin S. Andreasen (mudFTP, mcl)
greerga@circlemud.org | http://www.andreasen.org/
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST