NexusFi: Find Your Edge


Home Menu

 





Method within a method


Discussion in EasyLanguage Programming

Updated
    1. trending_up 1,112 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?
Czechia Live at 52.5% as England Rides 4-2 Wave to Co-Fa …
Prediction Markets & Event Contracts
Thanks Mike. Godspeed.
The Elite Circle
No book, only a stair: journaling fills where price move …
Cryptocurrency
The June 15 Resolution Trap: Irans Agreed Text Still Pri …
Prediction Markets & Event Contracts
$12M Ceasefire Contract Goes Disputed as Bandar Abbas St …
Prediction Markets & Event Contracts
 
  #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,643

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