help-octave
[Top][All Lists]
Advanced

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

Re: syntax error in irrelevant places


From: Doug Stewart
Subject: Re: syntax error in irrelevant places
Date: Sun, 14 Aug 2011 10:01:38 -0400



On Sun, Aug 14, 2011 at 9:52 AM, DGati <address@hidden> wrote:
Hello,

I'm trying to write a simple script but keep getting strange error messages
on places where I can't interpret them.

Initially, the error was located on line 19, in the last semicolon of the
_expression_:
guess = [1; 1; 3];
The error message was double (the ^ stands for the error location):

parse error near line 19 of file D:\octwork\benchmark.m
syntax error
>>> guess = [1; 1; 3]; ^
error: 'benchmark' undefined near line 4 column 1

Note: line 4 is only part of the introductory comments that Octave should
ignore.

Then I replaced that line with the _expression_ x=zeros(3,1);
The error stayed in line 19 with the same error message, and indication of
the error still on the last semicolon.
Then I commented line 19 and 20, and the error moved to line 20 and 21,
respectively. However, when I inserted spaces so that x=zeros(3,1); became x
=  zeros(3,1); the error was relocated to the 's' in zeros.

Now there's really nothing I can make out of this: the error message seems
so pointless and variable that I can't find any way to interpret it. Does
anyone know what could be wrong?




Could you send us the code before and after the "guess = [1; 1; 3]; line?
Doug 

reply via email to

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