NexusFi: Find Your Edge


Home Menu

 





Method within a method


Discussion in EasyLanguage Programming

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




 
Search this Thread
  #1 (permalink)
nfgrufio
Atlanta, GA
 
Posts: 19 since Apr 2023
Thanks Given: 1
Thanks Received: 0

Is it possible to have a method within a method?

I would think this was possible, but the attached code is not accepted.

Thanks!


Attached Images
 
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Strike Pause Holds, Oil Erases Monday Spike -- May CPI W …
Traders Hideout
The May 31 Binary: 60% Trump Declares Iran Ops Over, Onl …
Prediction Markets & Event Contracts
June 15 Peace Odds Surge From 3.6% to 12.25% After Trump …
Prediction Markets & Event Contracts
Wood Mackenzie Drops $200 Oil Forecast -- Airspace Expir …
Prediction Markets & Event Contracts
Iran Deal "In Review" at 87% on Deadline Day - …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
196 thanks
Sober Journey With S&P
27 thanks
30 Sessions
20 thanks
Volume Indicators
8 thanks
BERN ALGOS algo trading journal
8 thanks
  #2 (permalink)
Imsed1970
Seattle, WA, USA
 
Posts: 13 since Sep 2023
Thanks Given: 0
Thanks Received: 3

yes you can, its called "nested methods" ... you have not defined and declared the child method before you can call it.


Reply With Quote
  #3 (permalink)
nfgrufio
Atlanta, GA
 
Posts: 19 since Apr 2023
Thanks Given: 1
Thanks Received: 0



Imsed1970 View Post
yes you can, its called "nested methods" ... you have not defined and declared the child method before you can call it.

Thank you for the response.
Although I’m not sure I understand.

Would I declare the child() method outside of parent(), in the same manner parent() has been declared?

Could you post an example?


Reply With Quote
  #4 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,642

nfgrufio,

I do not think the TS compiler will let you declare a method within another method. However, since you can call methods from within a method where do you see the benefit in declaring the method inside your parent method versus declaring it outside of it?

Regards,

ABCTG


Follow me on X Reply With Quote
  #5 (permalink)
nfgrufio
Atlanta, GA
 
Posts: 19 since Apr 2023
Thanks Given: 1
Thanks Received: 0


ABCTG View Post
nfgrufio,

I do not think the TS compiler will let you declare a method within another method. However, since you can call methods from within a method where do you see the benefit in declaring the method inside your parent method versus declaring it outside of it?

Regards,

ABCTG

Yes, that is correct. Thank you for clarifying that for me!
I see now that just by calling a method inside another method, you are using nested methods.


Reply With Quote




Last Updated on October 2, 2023


© 2026 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 - Downloads - Top
no new posts