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

fileTell

fileTell( 
p_port 
) 
=> x_offset

Description

Returns the current offset in bytes for the file opened on a port.

Arguments

p_port

Port associated with the file.

Value Returned

x_offset

Current offset (from the beginning of the file) in bytes for the file opened on p_port.

Examples

Let the file test.data contain the single line of text:

0123456789 test xyz
p = infile("test.data")  
=> port:"test.data"
fileTell(p)
=> 0
for(i 1 10 getc(p))
=> t ; Skip first 10 characters
fileTell(p)
=> 10
fscanf(p "%s" s)
=> 1 ;s = "test" now
fileTell(p)
=> 15

Related Topics

infile

isFile

fileSeek

outfile


Return to top
 ⠀
X