COMP2100
EiffelAbout Emacs
In response to a query about Emacs on Windows, I present some links here. Do read the Emacs for Windows README. Then download djtarnt.exe, emacs-21.3-fullbin-i386.tar.gz, and eiffel.el. Install the latter in the site-lisp directory and follow its instructions in the INSTALLATION section.
About Eiffel
Our local Eiffel links may be useful.
About manifest strings
Some notes by Richard about manifest strings.
A recent revision of the Eiffel language (described in Bertrand Meyer's working copy of the new edition of Eiffel: The Language and implemented in SmartEiffel, but probably not described in many other places) gives you the option to choose the behaviour of manifest strings. This program fragment:
from i := 0 until i = 2 loop a := "abc" a.append("x") i := i + 1 end io.put_string(a) io.put_new_line from i := 0 until i = 2 loop a := once "abc" a.append("x") i := i + 1 end io.put_string(a) io.put_new_lineprints out the following:abcx abcxxThe value of the manifest string "a" is a reference to a new STRING object each time it is evaluated. Hence each iteration of the loop creates a new object for appending. The value of the manifest string once "a" is always the same: a reference to a STRING object that is created once for the duration of the system. Note that it is the reference that is the same each time, not necessarily the contents of the object. Thus, in the second loop, a is assigned the same reference in each of the two iterations, but the contents of the string being referenced changes over the execution of the loop.Note that in this case a.append(once "x") would do the same job as a.append("x") except that it avoids the creation of an extra string object each time.
But don't worry: there's a separate STRING object for each occurrence of the keyword once used in this way. For example, you can freely say once "x" in several parts of the program and they're not references to the same object. It would be bizarre if they were!
Eiffel Compiler
We will be using SmartEiffel version 1.1. We have some local Eiffel links which you may find useful. Or go directly to:
- on-line documentation on the SmartEiffel libraries and the compiler.
- Eiffel syntax expressed as a grammar.
GNU/Linux
You can download SmartEiffel 1.1 in tarred, gzipped format (click on the link) suitable for installation on GNU/Linux. Please read the READ_ME file!
Windows
You can download a packaged version of SmartEiffel 1.1 for Windows (click on the link). After installation (and I strongly suggest installing in the default location) you will need to include the following in your autoexec.bat file:
set path=c:\elj-win32\SmartEiffel\bin;c:\elj-win32\lcc\bin;%path% set SmartEiffel=c:\elj-win32\SmartEiffel\sys\system.se set GOBO=c:\elj-win32\lib\goboYes, the instructions that are included in the package for doing this are wrong.Windows 2000 and XP
Under Windows 2000 and XP it seems one is encouraged not to use the autoexec.bat file. (Despite the fact that Windows 2000 claims to ignore it, it doesn't.) It's recommended that you add the above environment variables using the Control Panel. (Bring up the Control Panel, double-click on System, select the Advanced tab, click on Environment Variables, and then (a) add the SmartEiffel and GOBO variables, (b) carefully add the two directories c:\elj-win32\SmartEiffel\bin and c:\elj-win32\lcc\bin to your path variable.
GUI library
For graphical user interface (GUI) programming we will be using the EXG library. Download EXG 0.95.
EXG depends on GTK version 1.2 (not the newer GTK version 2 - it won't work). Download it from gtk.org.
You may also need the ImageMagick package for image manipulation, at least for some of the examples.
Installing all of this is relatively easy on GNU/Linux systems. I believe it is possible on Windows, but I don't know any of the details. It shouldn't be too hard on other Unix-type systems. I don't know anything about Macs, but it may be possible with OS X since that has some form of Unix underneath.
Here are some links to documentation for EXG and GTK+, which we will be using for programming graphical user interfaces.
Index of short forms of all EXG classes. (This also has the short forms of all classes in the SmallEiffel standard library.
Other Eiffel Resources
A collection of Eiffel resources is provided at Cetus Links. Many of the other links on this page are simply selections from it. If you think that Eiffel is a language no-one uses, then you may be surprised to see how much work is being done on Eiffel. Look at the lists of Eiffel applications and class libraries available.
Look also at the ISE web site. ISE (Interactive Software Engineering) is Bertrand Meyer's company.
Copyright © 2004, Ian Barnes and Richard Walker, The Australian National University
Feedback & Queries to
comp2100@iwaki.anu.edu.au
Version 2004.7, 27 April 2004, 11:55:50