help-octave
[Top][All Lists]
Advanced

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

assigning value to structure with 3.4


From: marco atzeri
Subject: assigning value to structure with 3.4
Date: Sun, 27 Feb 2011 12:58:33 +0100

to build the cygwin octave forge package, I was used to manipulate the
octave_packages file for changing the directory information

the file is loaded in a structure and the elements looks like:

global_packages(1, i)
ans =
{
  [1,1] =

    scalar structure containing the fields:

      name = general
      version = 1.2.2
      date = 2010-03-12
      author = Jaroslav Hajek
      maintainer = Jaroslav Hajek
      title = General
      description = General tools for octave. String dictionary,
parallel computing.
      categories = General
      depends =
      {
        [1,1] =

          scalar structure containing the fields:

            package = octave
            operator = >=
            version = 3.2.4

      }
      autoload = yes
      license = GPL version 3 or later
      url = http://octave.sf.net
      dir = 
/pub/cygports/octave-forge/octave-forge-20110226-1/inst/usr/share/octave/packages/general-1.2.2
      archprefix =
/pub/cygports/octave-forge/octave-forge-20110226-1/inst/usr/lib/octave/packages/general-1.2.2
      loaded =  1

}


with a simple loop, on octave 3.2 I was trimming the dir info

for i =1:length(global_packages)
        
global_packages(1,i){1}.archprefix=substr(global_packages(1,i){1}.archprefix,inst_l)
;
        global_packages(1,i){1}.dir=substr(global_packages(1,i){1}.dir,inst_l) ;
 endfor


In 3.4 while I can read the elements

octave:29> global_packages(1, i){1}.archprefix
ans = 
/pub/cygports/octave-forge/octave-forge-20110226-1/inst/usr/lib/octave/packages/general-1.2.2

I don't succeed to change the value

octave:29> global_packages(1, i){1}.archprefix = a
error: () must be followed by . or close the index chain

Is the change  intentional ? How do I assign the new value ?

Marco


reply via email to

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