Quantcast
Channel: Cadence PCB Skill Forum
Viewing all articles
Browse latest Browse all 2157

Calling an user defined function

$
0
0

Hi,

I am trying to create an user define function to return MM DD YYYY from getCurrentTime(). Below is the program for the same.

procedure( DATE()

DATE_LIST = parseString( getCurrentTime())
MM = nthelem( 1 DATE_LIST )
DD = nthelem( 2 DATE_LIST )
YYYY = nthelem( 4 DATE_LIST )
return_list = printf("%s/%s/%s" MM DD YYYY)

)

With the above function, I want to display the date when ever the DATE() function is called. However is being return once I call the DATE() Function. for the below code

File=outfile("readme.txt" "w")

fprintf(File "DATE       :   %s\n\n" DATE())

close(File)

Any Idea how the date in the above prescribed format can be returned?

Thanks,

Sanjeev


Viewing all articles
Browse latest Browse all 2157


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>