Path: utzoo!attcan!uunet!grand!day From: day@grand.UUCP (Dave Yost) Newsgroups: comp.lang.eiffel Subject: Smalltalk to Eiffel translation dictionary Message-ID: <467@grand.UUCP> Date: 21 Dec 88 18:13:00 GMT Reply-To: Kim Rochat Organization: Grand Software, Inc., 213-650-1089, Los Angeles, CA Lines: 58 From: Kim Rochat Date: Mon, 7 Nov 88 13:59:10 PST In translating some Smalltalk-80 code to Eiffel, I found myself needing reminders on how to translate various expressions. I include my translation sheet below. I'd be interested in comments on other ways to write enumerating loops (or generators) in Eiffel. I've written the Smalltalk-80 assignment operator as ":=" instead of "_". Kim Rochat kimr@tekcrl.tek.com Smalltalk to Eiffel Dictionary Smalltalk Eiffel --------- ------- instance variables and methods feature instance variable attribute method routine self Current b at: i b.entry(i) b at: i put: j b.enter(i,j) b := new b.Create b isNil b.Void b := nil b.Forget a := b copy b.Clone(a) | a | local a: INTEGER anArray := Array new:10 anArray.Create(1,10); anArray do: [: each | each msg] from i := anArray.lower until i > anArray.upper loop anArray.entry(i).msg i := i + 1; end [aStream atEnd] whileFalse: from aList.start [aStream next msg] until aList.islast loop aCollection do: [: a | a msg ] alist.value.msg; aList.forth end 1 to: 10 do: [: i | ] from i := 1 until i > 10 loop ; i := i + 1 end