Re: Another question re documentation style

new topic     » goto parent     » topic index » view thread      » older message » newer message

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.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu