Original date:2019-09-07 17:38:44 Edited by: irv Subject: Re: Another question re documentation style

So far, many 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 



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.

Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu