Composants de texte structuré : Commentaires
Pour rendre votre texte structuré plus facile à comprendre, ajoutez des commentaires.
- Les commentaires vous permettent d'utiliser un langage explicite pour décrire le fonctionnement de votre texte structuré.
- Les commentaires n'ont aucun effet sur l'exécution du texte structuré.
Pour ajouter des commentaires à votre texte structuré :
Pour ajouter un commentaire | Utilisez l'un de ces formats |
Sur une ligne unique | //comment (*comment*) /*comment*/ |
à la fin d'une ligne de texte structuré | |
à l'intérieur d'une ligne de texte structuré | (*comment*) /*comment*/ |
qui est sur plus d'une ligne | (*start of comment. . .end of comment*) /*start of comment. . .end of comment*/ |
Par exemple :
Format | Exemple |
//comment | Au début d'une ligne //Check conveyor belt direction IF convoyeur_direction THEN... À la fin d'une ligne ELSE //If conveyor isn't moving, set alarm light light := 1; END_IF; |
(*comment*) | Sugar.Inlet[:=]1;(*open the inlet*) IF Sugar.Low (*low level LS*)& Sugar.High (*high level LS*)THEN... (*Controls the speed of the recirculation pump. The speed depends on the temperature in the tank.*) IF tank.temp > 200 THEN... |
/*comment*/ | Sugar.Inlet:=0;/*close the inlet*/ IF bar_code=65 /*A*/ THEN... /*Gets the number of elements in the Inventory array and stores the value in the Inventory_Items tag*/ SIZE(Inventory,0,Inventory_Items); |
Fournir une réponse