help-octave
[Top][All Lists]
Advanced

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

When is 'argv' initialized?


From: Peter L.
Subject: When is 'argv' initialized?
Date: Wed, 10 Sep 2008 10:30:53 +0200

Hi,

inspired by the recent discussion on calling "octave -q", I wanted to
supress the starting banner from the ltfat-toolbox, when octave is
called with --silent or -q. Code like this should work

args=argv;
for ii=1:numel(args)
  s=lower(args{ii});
  if strcmp(s,'--silent') || strcmp(s,'-q')
    printbanner=0;
  end;
end;

if printbanner
  ... print the banner
end;

The problem is that it does not work if the code is invoked from a
startup script (called from ~/.octaverc) because then

argv = {}(0x0)

If the code is called later then argv is properly initialized.

Is this a bug or a feature, or just something that is too complicated to
mess with?

Cheers,

Peter.



reply via email to

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