MQL5, two newbie questions

 

I've just started to study C and MQL5 at the same time and I have three questions.

1. In documentation, there are [in] and [out] words near the function parameters. What do they mean?

2. On the PrintFormat page, specification of data sizes section, why do we have two different size specifiers for some types? For example, long, it can be written by using both lld and as I64d. Why do we have two different size specifiers for it? Is there a different usage for them?

3. Why do we have size specifier for int type? My C book does not specify a size specifier for it? Just uses d for it without any size specifier. In MQL5, should I use d or ld or I32d for int types? What are the differences between them?

Thanks a lot for your patience for my rookie questions.

 

attila.okcu:

1. In documentation, there are [in] and [out] words near the function parameters. What do they mean?

2. On the PrintFormat page, specification of data sizes section, why do we have two different size specifiers for some types? For example, long, it can be written by using both lld and as I64d. Why do we have two different size specifiers for it? Is there a different usage for them?

3. Why do we have size specifier for int type? My C book does not specify a size specifier for it? Just uses d for it without any size specifier. In MQL5, should I use d or ld or I32d for int types? What are the differences between them?

  1. Input to function, output from function. [inout] both ways.
  2. Different flavors of Unix (1970) had different specifiers, and they were eventually merged. No difference.
  3. The default is 4 (int.) Use any you'd like, there is no difference. You must specify a size if you are passing a long. If you're going to have a I64@ should there also be a I32@? Same for ll@ and l@. (@ can be any of d, i, o, x, or X)

 
PrintFormat - Common Functions - MQL4 Reference
PrintFormat - Common Functions - MQL4 Reference
  • docs.mql4.com
PrintFormat - Common Functions - MQL4 Reference
Reason: