Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
function parameters can only be const? |
Mon, May 6 2013 10:12 PM | Permanent Link |
Stephen Barker | Hi,
I notice that in function parameter declarations, "var myVar : integer" is not allowed "const myVar : integer" is allowed "myVar : integer" is allowed None of these allow returning a value after the function is called - is that by design? I have a function that returns an object (TPanel) in the result variable, but I would also like to return it's ordinal position in the controls array as an integer var parameter. e.g. function TfrmMain.GetPanelByTag(const t : integer; indx : integer) : TPanel; ... Steve |
Tue, May 7 2013 7:35 AM | Permanent Link |
Matthew Jones | I asked about this before, and it seems that Javascript can't do var. Thus neither
can EWB. An old days hack like using a member variable will of course work around this. /Matthew Jones/ |
Tue, May 7 2013 4:41 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Stephen,
<< None of these allow returning a value after the function is called - is that by design? >> Yes - JavaScript doesn't support variable parameters, so initially it was left out of the compiler until I can come up with a solution with reasonable performance. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Monday, October 14, 2024 at 05:15 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |