<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><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></body></html>