End of File: Expected Endo

User ForumEnd of File: Expected Endo
marvin2jh asked 3 years ago

I was entering the below statements on Commands. But when I entered "do while i <= rows(ylist);  ", an error message of End of File: Expected Endo came out. I don't know the reason. Please let me know it. Thank you.  


do while i <= rows(ylist); "";"Processing ";;$ylist[i,1];;ylist[i,2]; ystr="" $+ ylist[i,1] $+ "." $+ iext; tcode=ylist[i,2]; if tcode .== 0; "Skipping"; goto bottom; endif; ydata=udatain(ystr,missc,dnobs); ytran=transx(ydata,tcode); ..............(continued)

1 Answers
aptech Staff answered 3 years ago

The do while loop needs to end with an endo statement like this:

i = 1;
do while i <= 10;
   i = i + 1;
   print "i = " i;

The error "End of File: Expected Endo" means that GAUSS could not find an endo statement to close the do while before it found the end of your file.