help-octave
[Top][All Lists]
Advanced

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

Re: textscan wanted


From: Ben Abbott
Subject: Re: textscan wanted
Date: Mon, 29 Aug 2011 07:52:32 -0400

On Aug 28, 2011, at 10:49 PM, redbaronMIT wrote:

> 

> ----
> Quoted message:
>> 
>> I've attached updated versions of strread.m and textscan.m
>> 
>> If the format includes regular expressions then these won't work. Otherwise,
>> the should be ok.
>> 
>> If no problems are found, I'll move this thread to the developers list.
>> 
>> Ben
> 
> I added both files to my Windows 3.2.4 Octave version.  I tested them with
> the "help COMMAND" and got the following error for strread ("help textscan"
> returned the help-text fine)
> 
> help strread
>>>> parse error near line 189 of file
> D:\Octave\3.2.4_gcc-4.4.0\share\octave\3.2
> .4\m\dev\strread.m
> 
>  syntax error
> 
>>>>  [~, ~, ~, fmt_words] = regexp (formatstr, "[^\\s]+");
>       ^
> 
> parse error near line 189 of file
> D:\Octave\3.2.4_gcc-4.4.0\share\octave\3.2.4\
> m\dev\strread.m
> 
>  syntax error
> 
>>>>  [~, ~, ~, fmt_words] = regexp (formatstr, "[^\\s]+");
>       ^
> 
> error: called from:
> error:   D:\Octave\3.2.4_gcc-4.4.0\share\octave\3.2.4\m\help\help.m at line
> 55,
> column 17
> 
> Let me know if this has a possible fix.
> -Jason

I don't have a copy of 3.2.4 to verify my suspicion on, but I think the "~" 
character in the output was introduced after version 3.2.4.

Thus, If you replace the tilde's with some place-holder variables the syntax 
error should go away.

        [foobar1,foobar2,foobar3, fmt_words] =  regexp (formatstr, "[^\\s]+");

Ben




reply via email to

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