bugGNU Octave - Bugs: bug #41262, general: does packfields work at...


bug #41262: general: does packfields work at all?

Submitted by:  Thomas Weber <tweber>
Submitted on:  Fri 17 Jan 2014 10:13:42 AM UTC  
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  3.8.0 Operating System:  GNU/Linux

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Wed 05 Feb 2014 01:12:02 PM UTC, comment #3: 

I took the change and also updated the documentation so hopefully it will be more clear in the future how to use it.

It is weird that the previous documentation says that it should be a struct while the source expects a string. Maybe a better fix would have been to change the source to accept a struct rather than change the documentation?

Carnë Draug <carandraug>
Project Member
Wed 05 Feb 2014 07:49:55 AM UTC, comment #2: 

Thanks for the explanation and the fix for the deprecation warning in relation with symbol_table::varref() in rev 12544.
I think this bug can be closed, but I am apparantly lacking the rights to do so.

Thomas Weber <tweber>
Tue 04 Feb 2014 03:39:19 PM UTC, comment #1: 

Looking at the source, I found what it's actually supposed to be doing. It works, but the syntax is very non-canonical, and instead of passing the arguments, you must pass the name of the arguments

octave-cli-3.8.0> s.a = 1;
octave-cli-3.8.0> b = 2;
octave-cli-3.8.0> packfields("s", "b")
octave-cli-3.8.0> s
s =

  scalar structure containing the fields:

    a =  1
    b =  2

Carnë Draug <carandraug>
Project Member
Fri 17 Jan 2014 10:13:42 AM UTC, original submission:  

I wanted to try out packfields, but all I can get from it is an error message:
octave:1> s.a = 1
s =

  scalar structure containing the fields:

    a =  1

octave:2> b = 2
b =  2
octave:3> packfields(s, b)
error: octave_base_value::convert_to_str_internal (): wrong type argument 'scalar struct'

This is with both 3.6.4 and 3.8.

Thomas Weber <tweber>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by tweber (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-05 carandraug StatusNone => Fixed
        Open/ClosedOpen => Closed

    Back to the top

    Powered by Savane 3.6