NexusFi: Find Your Edge


Home Menu

 





Method within a method


Discussion in EasyLanguage Programming

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




 
Search this Thread

Method within a method

  #1 (permalink)
nfgrufio
Atlanta, GA
 
Posts: 14 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?
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
Better Renko Gaps
The Elite Circle
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Deepmoney LLM
Elite Quantitative GenAI/LLM
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
Battlestations: Show us your trading desks!
26 thanks
The Program
18 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: 14 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,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

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 Twitter Reply With Quote
  #5 (permalink)
nfgrufio
Atlanta, GA
 
Posts: 14 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


© 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