I'm setting up an object that contains some ports,
which may or may not be open. 
i.e.: may or may not open "test.txt"
      may or may not open "dufus.txt"
obviously I don't want to attempt to close
what I didn't open.
If I initialize a word to none
as dufus-pointer: none
and don't open it.
the following code:
either equal? dufus-pointer none [][close dufus-pointer]
  generates an error: expected argument of type: port

similarly a function like
safe-close: func [p[port!]][if p [close p]]

generates an error message.

How can I get around this?


Thanks Folks!
Tim

Reply via email to