<div dir="ltr"><div><div>Hello, <br><br></div>I am trying to open a .txt file in a .gs grads script without luck. <br></div><div>Grads version 2.0.1<br></div><div><br><br></div>This is what I have <br><div><br>'open dummy.ctl'<br>file = 'A20100826a.txt'<br>colors="1 2 3 4 5 6 7 8 9 10 11 12 13"<br>ccount=0<br><br>rc=1<br>while (rc != 2)<br> data=read(file)<br> rc=sublin(data,1)<br> if (rc != 2)<br> line=sublin(data,2)<br> chk=substr(line,1,10)<br> if (chk != "----------")<br>.<br>.<br>.<br>.<br></div><div> The code keeps going but the error is at the "file" line. <br><br></div><div>Here is the error <br>file = 'A20100826a.txt'<br>Syntax Error: Expected operand or '('<br> Error ocurred at column 1<br>DEFINE error: Invalid expression. <br><br></div><div>Thanks!<br></div><div><br></div><div><br><br clear="all"><div><div><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="font-size:12.8px">----<br>Keren Rosado<br>PhD Candidate/Howard University/NOAA EPP GRTSP Fellow<br>Intern/NOAA/NWS/NCEP/EMC <br></div><div><span style="font-size:12.8px">5830 University Research CT</span></div><div><span style="font-size:12.8px">Cubicle 2795</span><br><span style="font-size:12.8px">College Park, MD 20740</span><br><span style="font-size:12.8px">Tel: </span><a href="tel:%28301%29-683-3763" value="+13016833763" target="_blank">(301)-683-3816</a><br>Cel: <span style="color:rgb(0,0,255)"><u style="background-color:rgb(255,255,255)">(407)-621-1676 </u><span style="background-color:rgb(243,243,243)"></span></span><br><span style="font-size:12.8px">Email: <a href="mailto:Keren.Rosado@noaa.gov" target="_blank">Keren.Rosado@noaa.gov</a><a href="mailto:Bin.Liu@noaa.gov" target="_blank"></a></span></div></div></div></div></div></div>
</div></div></div></div>