<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Bernd,&nbsp;<div>Get rid of the 'then' in your 'if' statement -- it is not part of the 'if' clause syntax.&nbsp;</div><div>--Jennifer</div><div><br><div><div>On Oct 26, 2010, at 10:06 AM, Becker, Bernd wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>dear all, <br>what is wrong with this?<br><br><br>ignore=(20101021)<br><br>in=0<br>while ( in &lt; 1 )<br> &nbsp;&nbsp;in= in &nbsp;&nbsp;+1<br><br>* check current date against list of dates to be ignored:<br> &nbsp;&nbsp;dimfx &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= subwrd(ignore, in)<br> &nbsp;&nbsp;say rc' 'valnum(dimfx)<br> &nbsp;&nbsp;dimfx &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= math_format('%10.2f', dimfx &nbsp;)<br> &nbsp;&nbsp;ifxdate &nbsp;&nbsp;&nbsp;&nbsp;= math_format('%10.2f', fxdate )<br> &nbsp;&nbsp;skip=(ifxdate-dimfx)/1.<br>* this is zero to trigger skip<br> &nbsp;&nbsp;say rc' 'dimfx' 'ifxdate' 'skip &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' 'valnum(skip) &nbsp;&nbsp;&nbsp;<br> &nbsp;&nbsp;if ( skip = int(0) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;) &nbsp;&nbsp;&nbsp;then<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;say 'skip 'dimfx &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' 'fxdate<br> &nbsp;&nbsp;else<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;say 'not skip 'dimfx &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' 'fxdate<br><br><br>for the life of it, skip is always true! even if skip is anything but<br>zero!<br><br>What can I do to skip if skip =0?<br><br>Cheers,<br>Bernd.<br><br>--<br>Bernd Becker &nbsp;&nbsp;Climate Impacts Product Development<br>Met Office Hadley Centre &nbsp;&nbsp;&nbsp;FitzRoy Road &nbsp;Exeter &nbsp;&nbsp;Devon EX1 3PB &nbsp;United<br>Kingdom<br>Tel.: +44 (0) 1392 884511 Fax: +44 (0)870 900 5050<br>E-mail:<a href="mailto:bernd.becker@metoffice.gov.uk">bernd.becker@metoffice.gov.uk</a> -<br><a href="http://www.metoffice.gov.uk/research/our-scientists/seasonal-to-decadal/">http://www.metoffice.gov.uk/research/our-scientists/seasonal-to-decadal/</a><br>bernd-becker<br><br><br>_______________________________________________<br>gradsusr mailing list<br>gradsusr@gradsusr.org<br>http://gradsusr.org/mailman/listinfo/gradsusr<br></div></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></div></span> </div><br></div></body></html>