1. Do Doc Examples Need To Repeat The Include Statement?
- Posted by euphoric (admin) Sep 22, 2019
- 894 views
Since we show the include statement in the function definition, it doesn't seem necessary to put the include statement in the examples.
However, I do understand the need for functioning examples (that is, copy/paste and it works); I'm just not sure people aren't going to understand that you have to include the library that contains the function/procedure you're demoing.
What do y'all think?
2. Re: Do Doc Examples Need To Repeat The Include Statement?
- Posted by ChrisB (moderator) Sep 23, 2019
- 872 views
Hi
From a beginners point of view, a functioning example should be a complete copy / paste and run, not a copy / paste and figure out why it crashes. So yes, I'm for a complete example.
Cheers
Chris
3. Re: Do Doc Examples Need To Repeat The Include Statement?
- Posted by irv Sep 23, 2019
- 861 views
Absolutely yes, they must all be working examples.
Note: there are a few example programs that access a file, those can't work unless that file exists. Those should have an explanation why that is the case.
4. Re: Do Doc Examples Need To Repeat The Include Statement?
- Posted by ChrisB (moderator) Sep 23, 2019
- 835 views
Or create the file.
Chris
5. Re: Do Doc Examples Need To Repeat The Include Statement?
- Posted by irv Sep 23, 2019
- 858 views
Or create the file.
Chris
Yes, and in the case where a binary file is created, note that the file will not be readable with normal text editors, etc. in case someone wants to look. (I did!)