[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 514

 
Reshetov:
Then goodbye. It is useless to teach a scientist. So let's not mock you if you're already all business.

Why send you away at once? There is nothing in the textbook about parameter transfers at the link. Why should I read the same thing 100 times? I asked a specific question. I've read the textbook a bunch of times. And I looked through it today, there's nothing in it about transferring parameters by reference!
 
hoz:

Why send them away at once?
  1. Not right away, but after some communication.
  2. Not to send, but to say goodbye.

Because I'm sick and tired of having conversations with literate people.

 

Your logic is strange. I did not call myself a literate. And the fact that there is not a single word in the so-called textbook on the subject I am interested in, it is the fault of its author, not mine... Why accuse me?

This thread is for newbies, not total ignoramuses who haven't read your textbook. I've been through it several times. I asked you a specific question, the answer to which is not in your textbook! Why this attitude towards me? Because there is a certainVladislavVG, who likes to send everyone to a textbook? I have already seen him do it more than once.

Show me in a textbook answer to my question and I will not appear here again, if you so desire...

 
hoz:

Your logic is strange. I did not call myself a literate. And the fact that there is not a single word in the so-called textbook on the subject I am interested in, it is the fault of its author, not mine... Why accuse me?

This thread is for newbies, not total ignoramuses who haven't read your textbook. I've been through it several times. I asked you a specific question, the answer to which is not in your textbook! Why this attitude towards me? Because there is a certainVladislavVG, who likes to send everyone to a textbook? I have already seen him do it more than once.

Show me in a textbook answer to my question and I will not appear here again, if you so desire...

Victor, you don't have to use parameter passing by reference (you had it initially). Pass it by value - it won't change the essence. The actual parameters must be predefined in the calling program and formal parameters in the called one. I hope you don't have any complaints to Kovalev?
 
Please tell me how to buy a trading robot?
 
ser7051200:
Can you tell me how to buy a trading robot ?
Repeat this phrase on google. Happiness is near!
 
ser7051200:
Please tell me how to buy a trading robot ?

You will find a salesman in Work! But note, there is no such thing as a robot that gives you income all the time. So you have to learn programming in order to constantly edit the parameters and even the algorithm of the program. Or become an investor, if you have money! Good luck!
 
tara:
Victor, you don't have to use parameter passing by reference (you had it initially). Pass it by value - it won't change the essence. Actual parameters must be predefined in calling program, formal parameters in called program. I hope you don't have any complaints to Kovalev?


Alexey, I understand that you can not use transfer by reference, and make these variables global... so that all f's see them... BUT why do it? If no other function will use certain EA variables, it's not reasonable to make them global. I understand that there are other ways to solve this, and I can do it in a different way, so the code compiles and EA works, but I want to learn how to pass parameters by reference, to be able to do it in the future.

tara:
(you had it originally).


If it was, why isn't it working?

tara:
The actual parameters must be predefined in the calling program, the formal parameters in the called program.


And how would it look in my case?

tara:
I hope there are no complaints against Kovalev?


No, of course, it couldn't cover all the programming topics that exist.

 
hoz:


I want to learn how to pass parameters by reference so that I can do it in the future.

If there was one, why isn't it working?

So how would this look in my case?

1. Simply specify the variables passed by reference with an ampersand in the list of formal parameters.

2. It doesn't work because it's not declared in the calling program.

3. Simply, declare variable types in special start function and make sure they are initialized. I recommend "old-school" approach: declarations first, procedures after.

SZ by reference is not an alternative to global variables. There's no such thing as a subroutine in C, there's only a function and a function has only one value. If you need a subprogram (with a lot of returned parameters), then use data passing by reference. In general, this is a very arbitrary abstraction - it's closer - the Common block from Fortran.

In short: when passing by reference, caller and called programs use the same memory space for passed variables/arrays. Formal parameters make actual sense, only their names don't matter.

 
hoz:

1) Your logic is strange. I did not call myself a literate. And the fact that the so-called textbook on the matter of interest to me, there is not a single word, it is the fault of its author, not mine.

2. Why accuse me?

3. this is a thread for newbies, not for total ignoramuses who haven't read your textbook. I've been through it several times. I asked you a specific question, the answer to which is not in your textbook! Why this attitude towards me? Because there is a certainVladislavVG, who likes to send everyone to a textbook? I have already seen him do it more than once.

...


1. Naturally, and who else! + do not understand why he did not lay out the GRAAL!!!? :-) Check your hands! ( Learn to use Google.

2. No one has accused you.

3- Without familiarity with the ABC and the Base, by - past the tutorial and the doki - I gave you references page by page earlier + use google, queries like "transfer parameters via link", "transfer parameters via link site:mql4.com" - to get out with questions on the forum, at least - mauvais ton!

Everything, IMHO!