Errors, bugs, questions - page 1498

 

If a person has purchased a paid product with 5 activations and wants to use it on his 10 mt4 terminals

How will the activation work?

Once for all terminals installed on 1 PC?

Each time on a new terminal installed on the same PC?
 
Vladimir Pastushak:

If a person has purchased a paid product with 5 activations and wants to use it on his 10 mt4 terminals

How will the activation take place?

Once for all terminals installed on 1 PC?

Each time on a new terminal installed on the same PC?
One activation on one PC. It does not matter how many terminals.
 
#property strict

void OnStart( void )
{
  int Tmp = 0; // отсутствует warning: variable 'Tmp' not used

  return;
}
 
Slawa:

How do you change GMT? "It's a monument!" (c) GMT is Greenwich Mean Time

Oh, yeah? That's nice.
 
zaskok3:
It is being used! You have assigned it value = 0. The warning is then there when it is only declared.
 

Developers! Are you planning to add a section on the standard library in the MQL4 reference book, like in the MQL5 reference book?

But they added OOP, the library, too... But they forgot about documentation...

 
zaskok3:

1)

#property strict

void OnStart()
  {
   int a,b;
   int value;
   a=1; b=2;
   Print("a + b = ",a+b);
  }

Caution:


2)

#property strict

int value;

void OnStart()
  {
   int a,b;
   a=1; b=2;
   Print("a + b = ",a+b);
  }

It's all good.

3)

#property strict

void OnStart()
  {
   int a,b;
   int value;
   a=1; b=2;
   value=3;
   Print("a + b = ",a+b);
  }

Everything's cool.

 
A warning about not actually using local and global variables (simple type or 'complex' without constructors) will be added, but the priority of this task is low.
 
Maxim Khrolenko:

2)

It's all good.

The road to programming hell is paved withglobalvariables' (Steve McConnell)
 
Alexey Kozitsyn:
Well, it is being used! You' ve assigned it a value = 0.

This is not a usage. You can of course argue that you could have assigned the result of an expression (function) rather than a constant zero. But that cannot be done when declaring a static variable:

static int Tmp = 0;

And there is no warning here.