Re: Bug in last line of source file
>Terry Constant writes:
>> The following six lines are the last lines in a main .ex file that
>> calls a function in an .e file. As is, they completely crashed
>> the program, with a screen full of error information, before it
>> would run.
>
>> ErrorFileList = NiceFormProcessFiles(CmdLin, Action)
>> if length(ErrorFileList) > 0 then
>> Writeln("ERRORS WITH THE FOLLOWING FILES:")
>> WritelnSp(ErrorFileList, "\n")
>> abort(1)
>> end if
>
>> When I add a final line, something like the "--end file"
>> comment below, the program works just fine.
>
>I ran your code on my machine (I had to supply dummy declarations
>for a few things) and did not see any crash. For me it's ok
>with or without the final comment line, and if I remove the
>final \r\n on the last line, so the last character in the file is 'f',
>it still runs ok.
I once got the same problem when "inventing" InstallKit. If you attach data
at the end of a bounded file, the last line of your program should be
"abort(0) [ENTER]". If you don't do this the Euphoria interpreter just tries
to go on reading the source file... and voila! you got an error. If you use
a comment mark ("--"), it work for a certain amout of data. If the data is
too long the interpreter complains "line too long" or something like that.
Regards,
Daniel Berstein
daber at pair.com
|
Not Categorized, Please Help
|
|