Menu

#1154 do loop error: missing block terminator on long script

closed-fixed
nobody
None
5
2012-08-03
2012-07-26
Keith
No

I have a 900 line script "multiplot_000001.in" that generates a multiplot with 4 plots and it runs fine, but I would like to have it run twice and generate 2 identical output files with different names. So I put in a do loop as follows:

do for [ii=1:2] {

...

}

but I always get the following error "line nnn: Syntax error: missing block terminator }" if I change the file structure around nnn changes.

I am using gnuplot from the windows installer: gp460-win32-setup.exe

Thanks,
Keith

Discussion

  • Keith

    Keith - 2012-07-26
     
  • Keith

    Keith - 2012-07-26
     
  • Keith

    Keith - 2012-07-26
     
  • Keith

    Keith - 2012-07-26
     
  • Keith

    Keith - 2012-07-26
     
  • Ethan Merritt

    Ethan Merritt - 2012-07-27

    The problem seems to be lack of a space between "{" and "set output" on line 4 of your script.
    Alternativel, adding a semicolon at the end of that line works also.

    So yes, a parsing bug of some sort.

     
  • Ethan Merritt

    Ethan Merritt - 2012-07-27

    Hmm. Actually, adding an extra character anywhere near there makes it work. I am guessing that some chunk of the input script comes out exactly on or exactly one character off from the end of an input buffer, whose extension is subsequently mishandled.

    Thanks for the test case.

     
  • Ethan Merritt

    Ethan Merritt - 2012-08-03
    • status: open --> closed-fixed
     
  • Ethan Merritt

    Ethan Merritt - 2012-08-03

    Fixed in CVS

     

Log in to post a comment.