[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Error Reading a file
From: |
Carlo De Falco |
Subject: |
Re: Error Reading a file |
Date: |
Wed, 29 Jun 2016 10:29:14 +0000 |
On 28 Jun 2016, at 20:43, Thomas D. Dean <address@hidden> wrote:
> I have a problem with octave reading an ascii file, based on its contents.
> There are no strange characters in the file. Am I doing something wrong?
>
> octave:1553> type xx
> ## Copyright (C) 2016 Thomas D. Dean
> ##
> ## This is free software: you can redistribute it and/or modify it under
> ## the terms of the GNU General Public License as published by the Free
> ## Software Foundation, either version 3 of the License, or (at your
> ## option) any later version.
> ##
> ## This code is distributed in the hope that it will be useful,
> ## but WITHOUT ANY WARRANTY; without even the implied warranty of
> ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> ## GNU General Public License for more details.
> ##
> ## You should have received a copy of the GNU General Public License
> ## along with this file. If not, see <http://www.gnu.org/licenses/>.
> ##
>
Reading stops here because the last line in the above is empty.
the condition
(str = []) != -1
evaluates to the empty matrix and while treats the empty matrix as 'false'
HTH,
c.