From Surf Wiki (app.surf) — the open knowledge base
Method stub
Short and simple version of a method
Short and simple version of a method
A method stub is a short and simple placeholder for a method that is not yet written for production needs. Generally, a method stub contains just enough code to allow it to be used a declaration with any parameters, and if applicable, a return value.{{cite web
A method stub may be used to implement an interface that is defined but for which the implementation is not available.
Example
In the following example pseudocode, the function returns a particular value even though ultimately it is supposed to read a value from a hardware source. It returns a valid value, allowing consuming code to be runnable. The function ignores the input parameter which is common for a stub.
function ReadThermometer(Source source) return 28 end function
References
References
- (2004). "Programming in C++". Jones & Bartlett Learning.
This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.
Ask Mako anything about Method stub — get instant answers, deeper analysis, and related topics.
Research with MakoFree with your Surf account
Create a free account to save articles, ask Mako questions, and organize your research.
Sign up freeThis content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.
Report