On 30/01/08 21:26 +0100, Sebastian Harl wrote:
> I've done some quick tests (I don't really use the pfstools octave bindings
> myself) and stumbled across the following error message:
> 
>   error: built-in function cannot be indexed with {
>   error: evaluating assignment expression near line 36, column 9
> 
> Line 36 looks like this (without indentation):
> 
>   command = argv{1};

argv was a variable in 2.1 and is now a function. Patch attached.

> Any ideas about this specific error? Is there any documentation about the
> transition from 2.1 to 3.0? I had a very quick look at the documentation but
> was unable to find anything useful for me.

Generally, most internal variables were switched to functions. I don't know
if argv is mentioned explicitly anywhere.

  Thomas
diff -r 8ec764054edf src/octave/pfsoctavelum
--- a/src/octave/pfsoctavelum   Sun Feb 10 20:50:18 2008 +0000
+++ b/src/octave/pfsoctavelum   Sun Feb 10 21:21:24 2008 +0000
@@ -33,7 +33,7 @@ if( length( argv ) != 1 )
   error( "Expecting exactly one parameter with octave code to be execuded" );
 endif

-command = argv{1};
+command = argv(){1};

 ## Add missing ';'
 if( command(length(command)) != ";" )
diff -r 8ec764054edf src/octave/pfsoctavergb
--- a/src/octave/pfsoctavergb   Sun Feb 10 20:50:18 2008 +0000
+++ b/src/octave/pfsoctavergb   Sun Feb 10 21:21:24 2008 +0000
@@ -33,7 +33,7 @@ if( length( argv ) != 1 )
   error( "Expecting exactly one parameter with octave code to be execuded" );
 endif

-command = argv{1};
+command = argv(){1};

 ## Add missing ';'
 if( command(length(command)) != ";" )

Reply via email to