Another question re documentation style

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

I notice that few (or none) of the doc examples given with the various functions bother to include the library being used:

Example for std/console.e:

clear_screen()  
display_text_image({1,1}, {{'A', WHITE, 'B', GREEN},  
                           {'C', RED+16*WHITE},  
                           {'D', BLUE}}) 

If a new user tries this simple code, he gets:

<0074>:: Errors resolving the following references:
    'WHITE' (my_test.exc:2) has not been declared. 
    'GREEN' (my_test.exc:2) has not been declared. 
    'RED' (my_test.exc:3) has not been declared. 
    'WHITE' (my_test.exc:3) has not been declared. 
    'BLUE' (my_test.exc:4) has not been declared. 
    'display_text_image' (my_test.exc:4) has not been declared. 
 
                           {'D', BLUE}}) 

You'll note that nowhere in that error message is it mentioned that his program needed to "include std/console.e".

So, should the demonstration programs have the needed includes added?

include std/console.e -- like this? 
clear_screen()  
display_text_image({1,1}, {{'A', WHITE, 'B', GREEN},  
                           {'C', RED+16*WHITE},  
                           {'D', BLUE}}) 
new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu