2 closefile(), 3 writestring(), Lose – Teledyne LeCroy SierraFC Verification Script Engine Reference Manual User Manual

Page 51: Rite, Tring

Advertising
background image

Verification Script Engine Reference Manual

46

22.2 CloseFile()

This function closes opened file.


Format :

CloseFile( file_handle )



Parameters:

file_handle - the file “handle”.


Example:

set file_handle = 0;

file_handle = OpenFile( “D:\\Log.txt” ); # opens file, the previous contents will be

# erased.


WriteString( file_handle, “Some Text1” ); # write text string to file
WriteString( file_handle, “Some Text2” ); # write text string to file

CloseFile( file_handle ); # closes file


22.3 WriteString()

This function writes text string to the file.


Format :

WriteString( file_handle, text_string )


Parameters:

file_handle - the file “handle”.
text_string - the text string”.


Example:

set file_handle = 0;

file_handle = OpenFile( “D:\\Log.txt” ); # opens file, the previous contents will be

# erased.


WriteString( file_handle, “Some Text1” ); # write text string to file
WriteString( file_handle, “Some Text2” ); # write text string to file

CloseFile( file_handle ); # closes file



Advertising