Download MetaTrader 5
To add comments, please log in or register
Read the Forum and improve your rating!
attila.okcu
152
attila.okcu 2016.10.31 13:36 

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.

whroeder1
14457
whroeder1 2016.10.31 16:31  

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
/
To add comments, please log in or register