Read a specific line from a file: Difference between revisions

m
no edit summary
No edit summary
mNo edit summary
Line 1,523:
 
get_nth_line filename 7</lang>
 
=={{header|Ursa}}==
<lang ursa>decl string<> lines
decl file f
f.open "filename.txt"
set lines (f.readlines)
f.close
 
if (< (size lines) 7)
out "the file has less than seven lines" endl console
end if
 
out "the seventh line in the file is:" endl endl console
out lines<6> endl console</lang>
 
=={{header|VBScript}}==
Anonymous user