[Top][All Lists]

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

Re: getstruct, setstruct, etc.

From: Paul Kienzle
Subject: Re: getstruct, setstruct, etc.
Date: Thu, 22 Jul 2004 19:38:53 -0400

On Jul 22, 2004, at 6:10 PM, Andy Adler wrote:

On Thu, 22 Jul 2004, Paul Kienzle wrote:

I can modify this. Any ideas on what to rename them to?

Since the existing functions allow get/set on multiple fields
simultaneously, I suggest getfields and setfields.

Is the code in the *.cc files active, or is it only the code
in the *.m files?

The code in the *.cc files is active.  The code in the m-files
is semi-active, in that some people use it when they can't
compile the *.cc files.  However, the m-file version and the
oct-file versions may be incompatible.

The existing code is backward compatible to older versions
of octave than will be supported by your replacement code.
It should, however, work back to 2.1.50 so I'm happy.

BTW, rather than num2str for the indices, you should be
substituting "varargin(i){:}" or sum such since indices might
be large vectors.

Should one be removed?

When looking at main/struct in octave-forge, I notice lots of
stuff that doesn't seem to be useful any more, such as
struct.cc, etc. I friend trying to compile octave-forge
against 2.1.57 just sent me a bug report saying because it
was trying to compile struct.cc and it failed.

Is it time to create an 'old_octave' directory to put
much of this code?

I commented on this earlier.

It would be nice to have a deprecated directory, and a set of
tests in configure.add of the form, e.g.,


a Makeconf.add which has, e.g.,


and Makefile which has, e.g.,

        ifeq ($(OCTAVE_HAVE_STRUCT),0)
                TARGETS=$(TARGETS) struct.oct

or for m-files:

        ifeq ($(OCTAVE_HAVE_NORMPDF),0)
                TARGETS=$(TARGETS) normpdf.m

        %.m: %.m.in ; $(CP) $< $@

        all: $(TARGETS)

        clean: ; $(RM) *.m *.oct *.o *~

If you are inclined to debug the details of this, please do.

Note that the bit operations need to go there in preparation
for octave-2.1.58.

In both the struct and bitops cases, though it is irrelevant
since the builtin function takes precedence over m-files and

I'll take care of doing this, if I get the "go ahead".

It seems you have the "go ahead".


- Paul

reply via email to

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