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

isPortAtEOF

isPortAtEOF(
p_port
)
=> t / nil

Description

Takes an input port and returns t if end-of-file (EOF) has previously been detected while reading the input port; it returns nil otherwise.

Arguments

p_port

Input port. This must be open, otherwise the function will return an error.

Value Returned

t

End-of-file (EOF) has previously been detected while reading the input port p_port.

nil

End-of-file (EOF) has not been reached yet.

Examples

port = infile("input_file")
while(! isPortAtEOF(port)
    printf("%L\n" read(port))
)
close(port)

Return to top
 ⠀
X