<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">OK, bummer.<div><br></div><div>Paul R.</div><div><br></div><div><div><div>On Jan 9, 2009, at 04:33 PM, Gary A. Ferguson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> <div style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"> <div dir="ltr" align="left"><span class="312003100-10012009"><font face="Arial" color="#0000ff" size="2">Nope, no difference. But I support your idea of requiring a "main" subroutine anyway. Tweaking v1 scripts has so far turned out to be no big deal.</font></span></div> <div dir="ltr" align="left"><span class="312003100-10012009"><font face="Arial" color="#0000ff" size="2"></font></span> </div> <div dir="ltr" align="left"><span class="312003100-10012009"><font face="Arial" color="#0000ff" size="2">Gary</font></span></div><br> <div class="OutlookMessageHeader" lang="en-us" dir="ltr" align="left"> <hr tabindex="-1"> <font face="Tahoma" size="2"><b>From:</b> apbeta-bounces@lists.astroplanner.net [<a href="mailto:apbeta-bounces@lists.astroplanner.net">mailto:apbeta-bounces@lists.astroplanner.net</a>] <b>On Behalf Of </b>Paul Rodman<br><b>Sent:</b> Friday, January 09, 2009 4:21 PM<br><b>To:</b> AstroPlanner Beta Testers<br><b>Subject:</b> Re: [APBeta] Parameter defaults<br></font><br></div> <div></div><br> <div> <div>On Jan 9, 2009, at 04:09 PM, Gary A. Ferguson wrote:</div><br class="Apple-interchange-newline"> <blockquote type="cite">  <div>  <div><span class="625160200-10012009"><font face="Arial" size="2">I keep having to   change lines like:</font></span></div>  <div><span class="625160200-10012009"><font face="Arial" size="2">c=new   Canvas(800,1000,"Magnification")</font></span></div>  <div><span class="625160200-10012009"><font face="Arial" size="2">into lines   like:</font></span></div>  <div><span class="625160200-10012009"><font face="Arial" size="2">c=new   Canvas(800,1000,nil,"Magnification",true)</font></span></div>  <div><span class="625160200-10012009"><font face="Arial" size="2">which is fine,   things change, it's a new version after all. But why can't I   use:</font></span></div>  <div><span class="625160200-10012009"><font face="Arial" size="2">c=new   Canvas(800,1000,,"Magnification") ?</font></span></div>  <div><span class="625160200-10012009"><font face="Arial" size="2"></font></span> </div>  <div><span class="625160200-10012009"><font face="Arial" size="2">The 2 new fields   in the constructor appear to be defaulted according to the framework, so it   seems like I shouldn't have to provide explicit values. Is this just something   about the particular version of BASIC that I don't   understand?</font></span></div>  <div></div></div></blockquote></div><br> <div>I dunno. Well, perhaps I do - it's just that I've never tried this:</div> <div><br></div> <div>I was recently told by the vendor that if you have your main program in a script not encapsulated in a method, then a lot of the "syntactic sugar" one would expect is not available to you. I suspect embedded default parameters might be included in this.</div> <div><br></div> <div>For this reason (and others) I am contemplating forcing the script writer to encapsulate their main program code in a "main" subroutine, which I would then call. Of course, this would mean that all V1 scripts would need tweaking, but then that's probably the case anyway.</div> <div><br></div> <div>Try putting your main program in a sub(routine) and calling it:</div> <div><br></div> <div>  sub main()</div> <div>     ...</div> <div>     program statements</div> <div>     ...</div> <div>  end sub</div> <div><br></div> <div>  main()   // Call main</div> <div><br></div> <div>and see if that resolves the issue. Let me know.</div> <div><br></div> <div>Paul R.</div> <div><br></div></div> _______________________________________________<br>APBeta mailing list<br><a href="mailto:APBeta@lists.astroplanner.net">APBeta@lists.astroplanner.net</a><br>http://lists.astroplanner.net/listinfo.cgi/apbeta-astroplanner.net<br></blockquote></div><br></div></body></html>