Product Documentation
Cadence SKILL Language Reference
Product Version IC23.1, November 2023

openportp

openportp( 
g_obj 
) 
=> t / nil

Description

Checks if the given argument is a port object and it is open (for input or output), nil otherwise.

Arguments

g_obj

Any SKILL object.

Value Returned

t

If g_obj is a port and it is open for input or output.

nil

If g_obj is not a port and it is not open for input or output..

Examples

(portp ip = (infile “inFile”)) 
=> t
(portp op = (outfile “outFile”))
=> t
(openportp ip)
=> t
(openportp op)
=> t
(close ip)
=> t
(openportp ip)
=> nil
(close op)
=> t
(openportp op)
=> nil

Related Topics

Input Output Functions


Return to top
 ⠀
X