Static Semantics meaning?

て烟熏妆下的殇ゞ 提交于 2019-12-20 15:46:25

问题


What does term "static semantics" mean in programming?

What is relationship between static semantics, semantics and dynamic semantics?

I know that semantics stands for checking if written code (without syntax errors) has any meaning.


回答1:


Semantics is about meaning. It includes:

  • the static semantics, which is the part that can be ascertained at compile time, including data typing, whether all variable are declared, which declaration applies to which variable in the case of scoping, what their type is, whether functions and methods are called with correct calling sequences, whether assignments are type-compatible, etc., and

  • dynamic semantics, which is what actually happens when the program is executed.



来源:https://stackoverflow.com/questions/40430578/static-semantics-meaning

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!