Hi all,
So I have a question about iteration. Here’s some code I saw on Ruby on
Windows:
inbox.Items.each do |message|
message.Attachments.each do |attachment|
filename = “c:\attachments\#{attachment.FileName}”
attachment.SaveAsFile(filename)
File.delete(filename) if File.size(filename) < 500000
end
end
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:
For each objMessage in colItems
Etc.
Next
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 | |?
Sorry for the retarded question,
Ron