Home > Mobile >  What is the difference between implementation and definition?
What is the difference between implementation and definition?

Time:11-29

I want to follow up on this question: What is the difference between a definition and a declaration?, there is answer about definition and a declaration, but nothing about implementation.

I want also know what is the difference between implementation and definition.

CodePudding user response:

implementation: if you have some pseudo-code or something like an UML-Diagram and write your code on that basis it's an implementation

declaration: a declaration is already in your code where you say the compiler/interpreter: "hey look there is this variable that I want to use but I dont want to give it any value yet"

and finally definition: definition is when you finally assign a value to your variable like x = 4. Like your defining x to be 4 (in your code)

Hope this is helpful to you

  • Related