Steckly, Ron
12/8/2007 1:04:00 AM
Hi all,
=20
So I have a question about iteration. Here's some code I saw on Ruby on
Windows:
=20
inbox.Items.each do |message|
message.Attachments.each do |attachment|
filename =3D "c:\\attachments\\#{attachment.FileName}"
attachment.SaveAsFile(filename) =20
File.delete(filename) if File.size(filename) < 500000
end
end
=20
What I find troubling is 'message,'. How do we know the variable to
iterate over? I have the same issue with VBScript, where the same code
would be:
=20
For each objMessage in colItems
Etc.
Next
=20
The thing that's bothering me is where people decide the thing to
iterate over. How do you decide what to put between the pipes | |?
=20
Sorry for the retarded question,
=20
Ron
=20
=20
=20