Newbie Question about Eiffel 
Author Message
 Newbie Question about Eiffel

Hi,

I have been learning how to use SmallEiffel and have been working on an
assignment for school that involves LINKED_LISTS.  The lecturer uses a
different type of Eiffel and he makes reference in all the study material to
routines that don't exist in SmallEiffel.  I was getting by and finding the
equivalent by choosing the menu option "short" on the class name in the
Small Eiffel EDitor.

That's fine, until I got to LINKED_LISTS.  SmallEiffel doesn't have a global
cursor and everything I attempt to do as per the lecturer's material doesn't
work.  I have done a lot of work in SmallEiffel so far so if I were to swap
over to the Uni's version of Eiffel, I would have to look up a lot of things
to convert my code.  My problem is that in the UNIX environment, I don't
know how to run short on a class, ie where do I type in the command?  I have
been working on a Windows PC so far.

On the other hand, if someone knows of some good resources where I can find
an example of  LINKED_LIST code in SmallEiffel, maybe I can continue using
SmallEiffel for my work.  My LINKED_LIST is a list of objects with many
attributes of different types.

If anyone can help, I would greatly appreciate it.

Michelle



Sun, 28 Mar 2004 20:06:58 GMT  
 Newbie Question about Eiffel

Quote:

> Hi,

> I have been learning how to use SmallEiffel and have been working on an
> assignment for school that involves LINKED_LISTS.  The lecturer uses a
> different type of Eiffel and he makes reference in all the study material to
> routines that don't exist in SmallEiffel.  I was getting by and finding the
> equivalent by choosing the menu option "short" on the class name in the
> Small Eiffel EDitor.

Well it may be helpful if you ask him to use the GOBO Library. It
works on any Eiffel compiler and the interface is of course the same.
Quote:

> That's fine, until I got to LINKED_LISTS.  SmallEiffel doesn't have a global
> cursor and everything I attempt to do as per the lecturer's material doesn't
> work.  I have done a lot of work in SmallEiffel so far so if I were to swap
> over to the Uni's version of Eiffel, I would have to look up a lot of things
> to convert my code.  My problem is that in the UNIX environment, I don't
> know how to run short on a class, ie where do I type in the command?

on the command line e.g short string.e | less
or short string.e > short_of_string.e
if you want to have html output
short -html1 string.e > short.html ...

Well you could help yourself probably with using the personal Version
of the Eiffel your Tutor is using too..

Quote:
>I have
> been working on a Windows PC so far.

even there short is working on the command line too. Anyway I do
think SmallEiffel really needs somewhat more decent facilities for
browsing or debugging. But as usually people are not
a) interested in working on that
b) won't even spend some money on an IDE.

Both let SmallEiffel be in a state it is ...

Quote:

> On the other hand, if someone knows of some good resources where I can find
> an example of  LINKED_LIST code in SmallEiffel, maybe I can continue using
> SmallEiffel for my work.  My LINKED_LIST is a list of objects with many
> attributes of different types.

Well that is a bit hard to believe. because LINKED_LISTs are usually
bound to some class which is usually not ANY...

However the differences are not so large. You have to be aware that
e.g ISE uses internal iterators whereas SmallEiffel uses external (as
does the GOBO library IIRC). so for itereatint you have ot have
something along

it: LINKED_LIST_ITEROR ...

!!it.make

it.start....

So I suggest spending some time reading the sources and you'll get the
idea...

Regards
Friedrich



Sun, 28 Mar 2004 22:30:28 GMT  
 Newbie Question about Eiffel

Quote:

> However the differences are not so large. You have to be aware that
> e.g ISE uses internal iterators whereas SmallEiffel uses external (as
> does the GOBO library IIRC).

Gobo supports both internal and external iterators.

--
Eric Bezault

http://www.gobosoft.com



Sun, 28 Mar 2004 22:27:33 GMT  
 Newbie Question about Eiffel

Quote:

> Hi,

> I have been learning how to use SmallEiffel and have been working on an
> assignment for school that involves LINKED_LISTS.  
[...]

> That's fine, until I got to LINKED_LISTS.  SmallEiffel doesn't have a global
> cursor and everything I attempt to do as per the lecturer's material doesn't
> work.  I have done a lot of work in SmallEiffel so far so if I were to swap
> over to the Uni's version of Eiffel, I would have to look up a lot of things
> to convert my code.  My problem is that in the UNIX environment, I don't
> know how to run short on a class, ie where do I type in the command?  I have
> been working on a Windows PC so far.

There are some precompiled distributions of smalleiffel on this Web
page:
http://smalleiffel.loria.fr/general/download.html

If none of those work for you, you can download the source and run the
instructions for making the installation (same page above). I've been
running the latest Beta for several days without problems. It's at:
ftp://ftp.loria.fr/pub/loria/SmallEiffel/se.beta_test/

Once installed, you need to make sure the smalleiffel bin directory is
in your path. Then you can run commands like:
     short LINKED_LIST | more
and get the results you expect. (Some unix systems have a "less" or
other more advanced version of "more" that will let you page around
the output. Worth checking out.)

There are Emacs extensions for Eiffel available, which will give you
syntax highlighting as you edit. See the bottom of this page:
http://smalleiffel.loria.fr/general/repository.html

Quote:
> On the other hand, if someone knows of some good resources where I can find
> an example of  LINKED_LIST code in SmallEiffel, maybe I can continue using
> SmallEiffel for my work.  My LINKED_LIST is a list of objects with many
> attributes of different types.

Search for LINKED_LIST in the Google repository for comp.lang.eiffel
http://groups.google.com/groups?hl=en&group=comp.lang.eiffel
Some examples should come up.

Once you get SmallEiffel running on your Unix box, look at
   short ITERATOR
and the LINKED_LIST feature get_new_iterator: ITERATOR[E]
Wherever your professor's example is using the internal or global
iterator, you should be able to replace it with an external iterator
obtained from the feature above.

And if you need to access the iterator from several different places?
Well, that's an exercise left to the student :-)

Greg



Mon, 29 Mar 2004 06:57:14 GMT  
 Newbie Question about Eiffel

Quote:

> On the other hand, if someone knows of some good resources where I can find
> an example of  LINKED_LIST code in SmallEiffel, maybe I can continue using
> SmallEiffel for my work.  My LINKED_LIST is a list of objects with many
> attributes of different types.

I'll reiterate what someone else said about the ITERATOR class; it provides
external iterators which, IMHO, are easier to use and less fuss than the
"built-in iterator" does.

Although I also second what someone said about the GOBO libraries.  Good
stuff.

I feel some of your pain with command-line issues, but I'm something of a
neanderthal there; Linux, EMACS, and the command line make me happier than
any IDE has, so I can't offer too many other alternatives (grin).

-->VPutz



Sat, 03 Apr 2004 03:25:41 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Newbie question about Eiffel vs. Smalltalk for OOP

2. Newbie questions about Eiffel

3. Newbie Eiffel questions

4. Newbie Question (Was: Newbie Question...)

5. Eiffel Questions (from an Eiffel novice)

6. Not a newbie, but a newbie question...

7. Trivial Newbie Question (Newbie)

8. Newbie: Free Eiffel for Windows 3.x

9. Absolute newbie having difficulty with Eiffel 5.2 on Windows 2000

10. Newbie in Eiffel

11. Newbie: Learning Eiffel

12. Thought from an Eiffel newbie

 

 
Powered by phpBB® Forum Software