View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

The syntax error: **: }

cosmologist wrote on Jan 24, 2011

Does anyone know what this syntax error might mean?


** Syntax error, line 1315
**: }


It says line 1315, but how do I know which file is that?

Mike Fitzpatrick wrote on Jan 24, 2011

It might help to know what command you are trying to use ..... Otherwise, type d_trace before running a script to trace its execution.

cosmologist wrote on Jan 24, 2011

I am using the wfreduce task in wifes package:

wifes> wfreduce
** Syntax error, line 1315
**: }


with d_trace:

wifes> d_trace wfreduce
ERROR: trace arg should be an integer
     called as: `d_trace (wfreduce)'


wifes> d_trace
12 1692+3: end
wifes> wfreduce
----- task cl - line 12 (CALL) -----
12 1684+6: call wfreduce
12 1690+3: exec
----- exec script wfreduce (wifes$wfreduce.cl) - line 12 -----
** Syntax error, line 1315
**: }
^
----- task wfreduce - line 1315 (END) -----
1315 1696+3: end
----- task cl - line 12 (END) -----
12 1693+3: end
wifes>

Could the problem in line 12 then?

Mike Fitzpatrick wrote on Jan 24, 2011

'd_trace' is a single command.

Otherwise, look at line 1315 of the wfreduce.cl script and check for a missing match to the close brace.

cosmologist wrote on Jan 24, 2011


# Subtract sky from object
    imdelete ( "s"//object//"_a", ver-, >& "dev$null" )
    printlog ( "Subtracting combined and scaled sky frame..", logfile=wflogstr, 
ver+ )
    gemarith ( object//"_a", "-", object//"_b", "s"//object//"_a", \
               fl_vardq=fl_vardq, logfile=nslogstr, ver- )
    if (gemarith.status != 0)  {
       printlog ( "***GEMARITH returned with an error***", \
                  logfile=wflogstr, ver+ )
       goto cleanup
    }

    imdelete (object//"_a", ver-, >& "dev$null")
    copy ( "s"//object//"_a.fits", object//"_a.fits", ver- )
    printlog ( "Done\n", logfile=wflogstr, ver+ )
    if (disp) {
       print ( "Displaying result of subtracting sky frame: s"//object//"_a\n" )
       display ( object//"_a[sci,1]", frame=1, fill+ )
    }
  date | scan(sdate)
  nhedit ( object//"_a[0]", "SUBSKYIM", sdate, "WFREDUCE doskyframes "// \
           "step completed", add+, delete-, ver-, show-, update+ )
  nhedit ( object//"_b[0]", "SUBSKYIM", sdate, "WFREDUCE doskyframes "// \
           "step completed", add+, delete-, ver-, show-, update+ )
  nhedit ( "s"//object//"_a[0]", "SUBSKYIM", sdate, "WFREDUCE doskyframes "// \
           "step completed", add+, delete-, ver-, show-, update+ )

}

It seems that there is an extra "}" in the end!

Last post on Jan 24, 2011