Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel-eecis!news.mathworks.com!tank.news.pipex.net!pipex!usenet2.news.uk.psi.net!uknet!usenet1.news.uk.psi.net!uknet!psinntp!psinntp!psinntp!ncrgw2.ncr.com!ncrhub2!eurohub!ddvictor.dundee.ATTGIS.COM!news
From: Tony Mochan <tmochan@wizardpost.dundee.ncr.com>
Subject: Re: [Q] For loops indices ... to: do:
X-Nntp-Posting-Host: 153.73.152.193
Content-Type: text/plain; charset=us-ascii
To: amochan@mcs.dundee.ac.uk
Message-ID: <31E62C69.F45@wizardpost.dundee.ncr.com>
Sender: news@ddvictor.dundee.ATTGIS.COM (Ref news)
Reply-To: tmochan@wizardpost.dundee.ncr.com
Content-Transfer-Encoding: 7bit
Organization: NCR (Scotland) Ltd
Mime-Version: 1.0
Date: Fri, 12 Jul 1996 10:43:53 GMT
X-Mailer: Mozilla 3.0b3Gold (Win95; I)
Lines: 47

Thanks everyone for your replies ... I used the 

	printQueue copy do: [:item | printQueue remove:item]

Thanks all for you replies!

Follows the full code ...

--

	self debugMessage:  ('Print Now').

	printQueue copy do: [ :i | 

	output:= (i asArrayOfSubstringsSeparatedBy: (Character value: 
2)).
	printQueueUserID:= (output at: 1).
	printQueueAddress:= (output at: 2).

		(printQueueUserID = userID)
			ifTrue: [
						self debugMessage:  
('Sent this ',(output at:3),' to ',printQueueAddress,' for UserID : 
',printQueueUserID).	
						printQueue remove: i.
						self debugMessage:  
('Removed from printQueue!').	
						]
			ifFalse:[
						self debugMessage:  
('Job not for this user.').			
						].
			].

	 resCode :=  ((Character value:  (responseCodes at: 
'PRINT_SCHEDULED')) segaWord).
      ^self sendMessage: (resCode,length).
	



--
Tony Mochan
Technology Development Division
NCR (Scotland) Ltd.
tmochan@wizardpost.dundee.ncr.com
Phone : +44 1382 59 8329  Fax : +44 1382 59 8313
