@Bankie: TAB is used to complete a word selected in the autocomplete list. ENTER is not appropriate for this purpose.
@Réno :
You must understand that "Type" and "Variable of custom type" are two different things. In your code you have both of them:
1. Type T00
2. Variables T00.T00 - variable with name T00 ( of type T00 ) - this is not a Type, it is a Variable. They have the same name only because you decided to use the same name.
And every variable must be declared as Global if you want it to act as global.
Because your variables T00 are not declared anywhere. You must declare them as Local or Global. That's the whole point of Strict mode - to highlight variables that are not declared.
Ok, the following example is same as yours, I just changed the variable names because I think that they are confusing you. As you can see, this code also works same as yours and you have 2 different variables. Just to show you that you are using Local variables that are not declared:
Please spend a little time and try to distinguish between "Type" and "Variables of Type" - these are two different things. You can have many different variables of the same type.
@Réno :
The code works, and I assume that Type are in this way Global, because I can use them into two functions
You must understand that "Type" and "Variable of custom type" are two different things. In your code you have both of them:
1. Type T00
2. Variables T00.T00 - variable with name T00 ( of type T00 ) - this is not a Type, it is a Variable. They have the same name only because you decided to use the same name.
And every variable must be declared as Global if you want it to act as global.
The probleme is, when you cut and past this code into IDEal, the variables of my Type are in red, so IDEal thinks that they are not declared variables
Because your variables T00 are not declared anywhere. You must declare them as Local or Global. That's the whole point of Strict mode - to highlight variables that are not declared.
Ok, the following example is same as yours, I just changed the variable names because I think that they are confusing you. As you can see, this code also works same as yours and you have 2 different variables. Just to show you that you are using Local variables that are not declared:
Type T00 ; this is TYPE Field T00v10v00% End Type Function GESTION00A() Myvar.T00=New T00 ; This is Variable ( of type T00 ) Myvar\T00v10v00=Rand(0,9) Print Myvar\T00v10v00 End Function Function OBJET00A() ;Local myvar2.T00 For myvar2.T00=Each T00 myvar2\T00v10v00=(myvar2\T00v10v00+1) Print myvar2\T00v10v00 Next End Function ;Print T00\T00v10v00 ; If you put this line into your example, compiler will report an error Repeat GESTION00A() OBJET00A() Print "" WaitKey Delete Each T00 Until KeyDown(1)
Please spend a little time and try to distinguish between "Type" and "Variables of Type" - these are two different things. You can have many different variables of the same type.