Want to add: 
You can 'probe for tracing,
 safe-close: func [p][if probe p <> [] [close probe p]]
'probe will show you the values without modifying something.
good if one mistake content or the error-position.

(thanks for the more specific answers for inits :)

Volker

> Hi Ladislav:
>     Yes, your code works for me. But I wrote a function
> as follows:
> safe-close: func [p[port!]][if p [close p]]
> lets say  
> dufus: none
> safe-close dufus
> generates
> Script Error: safe-close expected p argument of type: port
> HOWEVER:
> if I write 
> safe-close: func [p][if p <> [] [close p]]
> dufus: []
> safe-close dufus
> I get no error message.
> :>) Duh!! I know I have lots to learn yet.
> Thanks
> Tim
> >Sorry, I don't understand. For me your code works:
> >
> >>> dufus-pointer: none
> >== none
> >>> either equal? dufus-pointer none [][close dufus-pointer]
> >>>
> >
> >    Ladislav
> >
> >
> 
> 
> 

Reply via email to