If I would have selected to make the constant global, (Defined in a tag table) I would name it C_PI instead… Anyway. I always write my constants in capital letters, everything to make the program more readable. We also define one constant PI: I use to name all my local constants to start with CF = Constant in Function. Do the same for the two other objects Rectangle and Triangle. (Note the REF_TO in front of the declaration, this indicates that this is to be a reference to a variable, this is the new TIA V15 twist saving you time). REF_TO “TCircle” : Defined as a reference to a circle. We define 3 Temp variables as references to the defined objects. Our function will return the calculated area and update the object. We define one in/Out Parameter That is defined as a variant to be able to point on any object from which we want to calculate the area.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |