octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: format compact and loose


From: Jordi Gutiérrez Hermoso
Subject: Re: format compact and loose
Date: Wed, 7 Sep 2011 19:57:32 -0500

2011/9/6 John W. Eaton <address@hidden>:
> On  6-Sep-2011, Jordi Gutiérrez Hermoso wrote:

> | Also, for anyone checking my C++: I made the compact_format
> | variable visible in two more TUs besides its original
> | pr-output.cc. Yes! A global variable! ;-) But I think it's ok to
> | pollute the global namespace a little here.
>
> I'd rather avoid the global if possible.

I tried to avoid it, but it involved changing the API for several
classes derived from octave_base_value. The changes cascaded far, and
in the end, I still made several mistakes that gave runtime errors. I
decided against it finally because all ini all the compact_format
state is really global state anyways, so why not use a global variable
for global state?

> If it is necessary to make compact_format global, then please
> declare it in pr-output.h instead of adding individual extern
> declarations in multiple places.
>
> Though we are not editing ChangeLog files directly, the preferred
> format still has some merit,

That's what I ended up doing:

    http://hg.savannah.gnu.org/hgweb/octave/rev/969ed305dde5

It now appears that "format compact" produces output without blank
lines, as requested by Zbigniew.

I hope I wasn't too rash to push this change. But it seems to work for
me.

- Jordi G. H.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]