NexusFi: Find Your Edge


Home Menu

 





Function with optional parameters


Discussion in TradeStation

Updated
    1. trending_up 2,293 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 0 posts
    2. attach_file 0 attachments




 
Search this Thread

Function with optional parameters

  #1 (permalink)
ZARk
Waterloo
 
Posts: 9 since Aug 2009
Thanks Given: 1
Thanks Received: 1

Hello

Under TS8 . Is it possible to call a function with optional parameters ?

Ideally, i'd like to call a function with an unlimited amount of params, but this is most probably not supports under EasyLanguage ? ( Under c# we have the "params" keyword to allow this).

My work-around would be to accept an Array as parameter. But i would like users who do not need to send the array to not have to create an empty array and call the function with an empty array.


so basically i'd like to be able to do this :

ret = myFunc();

AND

Array: myArray [2] ("");
myArray[0] = "TestValue";
myArray[1] = "54";

ret = myFunc(myArray);

Reply With Quote




Last Updated on June 1, 2012


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts