Re: Another question re documentation style
- Posted by irv Sep 07, 2019
- 1081 views
So far, much if not most of the demo code attached to the docs is faulty.
For example, datetime:now()
dt = now() -- dt is the date and time
See anything wrong? How about the fact that dt hasn't been declared? Also, the fact that std/datetime.e has to be included has been forgotten. And lastly, where is the result? What should it look like? How do I see it?
A newcomer is going to fail at least 3 times to get any usable output from this one-line program!
Let's do it right:
include std/datetime.e object dt = now() ? dt -- display the results
Output:
{2019,9,7,17,30,38}
It's been wrong for a very long time. And that, friends, is why locking the documentation into source code where it can't be changed is a bad idea.