>Is there any reason to not pass file handles as parameters to methods?
>
>I have a class that formats data into html...
>
>
>=fwrite(f,htmlformat.td(table.field))
>
>
>This writes
'<td>My Data</td>'
to file handle f.
>
>I could save a lot of coding if it is an ok practice to pass the file handle. Therefore it would become...
>
>
>htmlformat.td(f,table.field)
>
>
>...with the fwrite happening in the method.
I would say the later approach is better. Or, if you would have this as an object, you could define a property nHandle and only initialize it once.