'Conditional Branching - 'GoTo' Kluge ? - page 5

 
7bit:
There you have your GOSUB and RETURN, built right into the mql4 language, even with passing arguments and return values which was not even possible in Commodore-BASIC or whatever other ancient and crippled language you are constantly trying to compare it to. Where have you been during the last 30 years?

Hi 7bit et al,

As I've repeatedly posted and as is the subject of this thread, i'm not disputing what MQL4 CAN do such as your example where everything is for the most part sequential and within the scope of one function. But it doesn't jump to place in the program other than within the scope of the current function(s), or continuing on past this after this point in the program after the current executions are completed.

Lets say one has there Money Management at an early part in the program, or even before the 'Start'. What I'm talking about is that at any (subsequent) place in the program, rather than adding in the same code again every time one wants and needs to calculate this, on just jumps back to the ONE function(s) /Done group to calculate this and then return back to the point where it was called from with the necessarily info needed for the numerous places within the program that need Money Management calculations.

I'm not sure why this is so hard to grasp and why people keep telling me what and how 'returns' work within the scope of the function.

What I am talking about is going to another place in the program that is NOT within the current scope of program execution, utilizing the code, and then returning back to the point where it was called from and carrying on.

 
FourX:

What I am talking about is going to another place in the program that is NOT within the current scope of program execution, utilizing the code, and then returning back to the point where it was called from and carrying on.

for the last time, that is called a function as you were told

  1. here https://www.mql5.com/en/forum/138989
  2. and here https://www.mql5.com/en/forum/138989
  3. and here https://www.mql5.com/en/forum/138989
  4. and you understood that here https://www.mql5.com/en/forum/138989
  5. and iterated here https://www.mql5.com/en/forum/138989

Now go away

You were labeled a troll 7 months ago


Please do not feed the troll.

When you respond, you give the troll power. When you ignore the troll, he starves for attention and eventually dies.