Variable Syntax Question
                    Hi everyone ! I have a simple question. Does it is possible to define each line of an array in one sentence
Here is the example :
VAR String Mot_Controle{7,2};
        
!Définition des variables
Data:="";
Mot_Controle{1,1}:="PHP0";
Mot_Controle{1,2}:="Demande d'arrêt de la pompe";
Mot_Controle{2,1}:="PHP1";
Mot_Controle{2,2}:="Demande de basse Pression";
Mot_Controle{3,1}:="PHP2";
Mot_Controle{3,2}:="Demande de haute Pression";
Mot_Controle{4,1}:="PHP3";
Mot_Controle{4,2}:="Demande de départ de la pompe";
Mot_Controle{5,1}:="PHP4";
Mot_Controle{5,2}:="Demande d'état de la pompe";
Mot_Controle{6,1}:="PHP5";
Mot_Controle{6,2}:="Signal Robot au repos";
Mot_Controle{7,1}:="PHP6";
Mot_Controle{7,2}:="Signale Robot en Découpe";
Does it is possible to define the 1,1 and the 1,2 on the same line ?
Thanks !
                
                Here is the example :
VAR String Mot_Controle{7,2};
!Définition des variables
Data:="";
Mot_Controle{1,1}:="PHP0";
Mot_Controle{1,2}:="Demande d'arrêt de la pompe";
Mot_Controle{2,1}:="PHP1";
Mot_Controle{2,2}:="Demande de basse Pression";
Mot_Controle{3,1}:="PHP2";
Mot_Controle{3,2}:="Demande de haute Pression";
Mot_Controle{4,1}:="PHP3";
Mot_Controle{4,2}:="Demande de départ de la pompe";
Mot_Controle{5,1}:="PHP4";
Mot_Controle{5,2}:="Demande d'état de la pompe";
Mot_Controle{6,1}:="PHP5";
Mot_Controle{6,2}:="Signal Robot au repos";
Mot_Controle{7,1}:="PHP6";
Mot_Controle{7,2}:="Signale Robot en Découpe";
Does it is possible to define the 1,1 and the 1,2 on the same line ?
Thanks !
0  
            Comments
- 
            VAR String anArray{7,2};
anArray:=[["",""],["",""],["",""],["",""],["",""],["",""],["",""]];
0 - 
            Thanks !
There is an commande to find the position of a specific string within the array ? I can do it using a for loop but I'm looking for a simpler way
0 - 
            Don't think so -- I always FOR loop to find.
0 
Categories
- All Categories
 - 5.6K RobotStudio
 - 401 UpFeed
 - 21 Tutorials
 - 15 RobotApps
 - 306 PowerPacs
 - 407 RobotStudio S4
 - 1.8K Developer Tools
 - 250 ScreenMaker
 - 2.9K Robot Controller
 - 363 IRC5
 - 81 OmniCore
 - 8 RCS (Realistic Controller Simulation)
 - 853 RAPID Programming
 - 31 AppStudio
 - 4 RobotStudio AR Viewer
 - 19 Wizard Easy Programming
 - 110 Collaborative Robots
 - 5 Job listings
 
