Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!mailrus!ncar!boulder!ccncsu!sor.CS.ColoState.Edu!wongkc From: wongkc@sor.CS.ColoState.Edu (kam chooi wong) Newsgroups: comp.lang.eiffel Subject: class environment, suffix .env Message-ID: <5193@ccncsu.ColoState.EDU> Date: 8 Mar 90 20:03:43 GMT Sender: news@ccncsu.ColoState.EDU Reply-To: wongkc@sor.CS.ColoState.Edu (kam chooi wong) Organization: Colorado State University, Ft. Collins CO 80523 Lines: 37 I was using the ENVIRONMENT class in Eiffel and discovered some misleading/incorrect descriptions in the Eiffel Language Manual. On page 188, the example code shows in order to store persistent objects and associate them with an environment, ....(env and ext_file declared here) env.Create; -- create an environment ext_file.Create("session1.S"); -- create a file to be -- associated with the environment ext_file.open_write; env.set_file(file1); -- associate file with environment env.store_on_end; ....(some other manipulations) (1) The suffix ".S" as in the "session1.S" file should really be ".ENV". The file1 variable listed above in the example should really be ext_file. (2) There is no information in the Language manual or in the Library manual that hints at the required ".ENV" suffix. I had to look at the online ENVIRONMENT.E code file under the installed Eiffel's library/support subdirectory to find out why I got the run-time error in my own program. One of the preconditions (in the require clause) of the set_file feature in class ENVIRONMENT is good_suffix which is an instance of the boolean routine is_env_of(f: file). A short on the class ENVIRONMENT does not reveal the precondition "good_suffix" nor the "is_env_of(f)" routine as this is a non-exported feature. If I am missing something altogether, I appreciate people letting me know. Otherwise, I would like to suggest that there should be some documentation on such "secret" required features and their semantics in the relevant chapters in future updates of the manuals.