[Newbies] Array questions

noobie pntball650 at aol.com
Fri Apr 23 22:07:57 UTC 2010


I have a few questions about writing methods dealing with arrays....

Firstly, how would i make a method that returns true or false if the
receiver is in the array.
example
1 inArray: #(1 2 3 4)
should return to true

Second, how would i make a method that will return the number of integers in
the array different from the integer parameter

anArray howmany: 5   should return how many elements in the array are
different from the number 

thanks again.
-- 
View this message in context: http://forum.world.st/Array-questions-tp2063011p2063011.html
Sent from the Squeak - Beginners mailing list archive at Nabble.com.


More information about the Beginners mailing list