EEVblog Electronics Community Forum
Electronics => Beginners => Topic started by: BitsnBytes on February 05, 2021, 02:30:24 pm
-
Hello!
Recently I came across the term semantics in context of C programming language.
I don' t understand the meaning. Anyone please???
Regards
-
Below is a thread about semantics (vs syntax) that might give some insight (and possibly add some confusion), but for a simple, high level, conceptual answer these definitions from a post in the thread might be a useful starting point:
Syntax is the grammar of a language - the rules by which to form sentences or expressions.
Semantics is the meaning you are trying to express with your code.
https://stackoverflow.com/questions/209979/are-semantics-and-syntax-the-same/210044#210044
-
It's a term from general linguistics, applied to the much narrower field of programming languages. Semantics is about the meaning of language, as contrasted with studying the structure of language which is called syntax.
In programming languages it's generally used to describe what will happen if you use a particular program construct, that is, how it will be executed by the computer being programmed.
-
OK thanks.
I will have a look.
-
It starts out easy and then gets deeper and wider. The trick is to find what you are looking for that is accurate and that speaks to you in a way that enables you to absorb it and apply it when you need it.
Might be something in here that will help you see a view that will help you:
https://www.researchgate.net/publication/2822951_The_Semantics_of_the_C_Programming_Language (https://www.researchgate.net/publication/2822951_The_Semantics_of_the_C_Programming_Language)
-
Might be something in here that will help you see a view that will help you:
https://www.researchgate.net/publication/2822951_The_Semantics_of_the_C_Programming_Language (https://www.researchgate.net/publication/2822951_The_Semantics_of_the_C_Programming_Language)
Thank you so much, it's a great help!
Regards