Status: offline
Registered: 06/07/2006
Posts: 95
|
Hi allI get the following error message when I try to run a script.boyden> dirsetup
ERROR: Newline while processing string
"# Set the environment"
line 26: boyden$dirsetup.cl
called as: `dirsetup ()'Here is the script
[code:1:6e5b0af50c]
# Dirsetup script for creating datalists of the appropriate files from the
# header field values. Thus creates lists containing the dark-, bias-, object-
# and filter specific flatframes.procedure dirsetup (fitfiles) # Define procedure# Define procedure variablesstring fitfiles {prompt="The fitfiles to be listed"}struct *fitlistbegin # Define script variables
string ffiles, fits, data, biaslist, darklist, flatlist, imagelist
# Make sure the necessary packages are loaded
if (! defpac ("imutil")){
bye()
}
;
# Set the environment
unlearn all
unlearn allphot, biasred, darkred, fixheader, flatred, magcor, reduction, stardump
# Expand the fitfiles template into a text file list
ffiles = mktemp ("tmp$setup")
sections (fitfiles, option="fullname", > ffiles)
# Redirect
fitlist = ffiles
biaslist = "biaslist"
darklist = "darklist"
flatlist = "flatlist"
imagelist = "imagelist
# Scan through the fitlist
while (fscan (fitlist, fits) != EOF) {
# Get the exptype from the fit files
hselect (fits, "EXPTYPE", yes) | scan(data)
if (nscan() != 0) {
# Write the fit-files to specific predefined lists
if (data == "BIAS") {
sections (fits, option="fullname", >> biaslist)
}
else if (data == "DARK") {
sections (fits, option="fullname", >> darklist)
}
else if (data = "FLAT") {
sections (fits, option="fullname", >> flatlist)
}
else if (data = "DATA") {
sections (fits, option="fullname", >> imagelist)
}
;
}
;
}
;
# Clean up
delete (ffiles, ver-, >& "dev$null")end
[/code:1:6e5b0af50c]I did a search on the error, but mine does not seem to correspond the the other newline error that I saw. I went through all the files for the external boyden package that I build, but could not find the error. The script did not give any errors until I added the "If-else" statements for the file sorting into lists.ThanxRegards
Pat
|