老外写的ST-语言教程,很详细.ppt
文本预览下载声明
* Corso Base Linguaggio ST * * Corso Base Linguaggio ST * * Corso Base Linguaggio ST * * Corso Base Linguaggio ST * * Corso Base Linguaggio ST * * Corso Base Linguaggio ST * * Corso Base Linguaggio ST * * Corso Base Linguaggio ST * * Corso Base Linguaggio ST * * Corso Base Linguaggio ST * * Corso Base Linguaggio ST * * Corso Base Linguaggio ST * * Corso Base Linguaggio ST * * Corso Base Linguaggio ST * * Corso Base Linguaggio ST * * Corso Base Linguaggio ST * * Corso Base Linguaggio ST * * Corso Base Linguaggio ST * * Corso Base Linguaggio ST * * Corso Base Linguaggio ST * * Corso Base Linguaggio ST * * Corso Base Linguaggio ST * * The fields of a structure can be of elementary type, of type structure, Array, n-dim Array, not Array of structures A structure must be instanced, before to be used, in such way comes reserved in memory the necessary space to its data. The space occupied by a structure is given by the sum of the space occupied by each single fields. In order to access/to modify single fields of a structure the ‘.’ is used (e.g.: Room_Temp.Temperature). It is possible to assign a structure to another, thus realizing the copy of the data. Remember the two instances must be of the same type (such as the Arrays). The data type ‘Structure’ The structures are used in order to create more complex user types, of the normal elementary types. A structure is a data type that contains a predefined number of fields, usually of different types. Structure instance Temperature Pressure Humidty Room_Temp Field Room_Temp_2 Room_Temp_1 Structure instance Cmpr_Info Field Running_Hours Cmpr_N 悔糊向纲窝洲缀砂苔映苛榨粟跺替唇胸贡澡臼聘父贝嫂衙胸樊气说急宋樱老外写的ST语言教程,很详细老外写的ST语言教程,很详细 * TYPE … STRUCT statement Allows to define the data type ‘structure’. Definition syntax TYPE ???structure_type : ???STRUCT ??????field_1_name : data_type; ??????field_n_name : data_type {:=value}; ???END_STRUCT; END_TYPE Instance delaration sysntax VAR_GLOBAL ???my_struct1 : structure_type; ???my_struct2 : structure
显示全部