help-octave
[Top][All Lists]
Advanced

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

syntax error in irrelevant places


From: DGati
Subject: syntax error in irrelevant places
Date: Sun, 14 Aug 2011 06:52:24 -0700 (PDT)

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?


--
View this message in context: 
http://octave.1599824.n4.nabble.com/syntax-error-in-irrelevant-places-tp3742878p3742878.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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