In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
When studying C in college, the teacher will emphasize that the "pointer" is a difficult point and very important when he talks about this chapter. After work, engaged in PLC programming. Colleagues who debug the production line together see that I write FB blocks in STL language in Step7, and inevitably use pointers to do some DB blocks or communication data processing, they feel that my technology is good nb ah! PLC generally uses a ladder diagram (foreigners use FBD), they feel fresh, nb. In fact, I am not trying to pretend to use this kind of assembly language, but mixed programming, what is suitable for use, pointers are also out of need. Moreover, as the basic programming literacy of C language and the basic knowledge of microcomputer theory, it is natural to use assemblers and pointers. The reason for this illusion is probably because this area is strange to other people and is mysterious because it is strange. With a little emotion, the following is a brief description of several knowledge points of the pointer, and refer to teacher Tan Haoqiang's book for details. You still have to be honest in learning skills.
&: get the address (that is, get the address according to the variable name)
*: get data (that is, get data according to address)
Pointer: the storage address of a variable on a microcomputer
Pointer variable: a variable that stores the address itself (after the address is quantized to achieve the address offset function)
Define the format of the pointer variable: int * point (int: base type (make sure the pointing type is the same as the storage type, otherwise it will be messed up); *: indicates that the variable is a pointer variable; point: pointer variable name; meaning: pointer to int)
In most cases, the address stored in the pointer variable is obtained by "taking the address". It is meaningless to assign a value directly to the pointer variable, and the microcomputer decides the specific storage location on its own.
Type:
Pointer array, pointer string (which I use most in PLC), pointer function (note the difference between formal parameter pointers), and so on. [the principle is the same, change the soup without changing the medicine]
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.