Jump to content

Read a specific line from a file: Difference between revisions

m
mNo edit summary
Line 224:
<lang Amazing Hopper>
#include <hopper.h>
#define MAX_LINE_SIZE 1000
main:
v=0, fd=0
fsearch("-r $'\n'","archivo.txt")(v)
fopen(OPEN_READ,"archivo.txt")(fd)
{"Line #7 = "}, fgetsline(fd,1000MAX_LINE_SIZE,7,v), println
try
fgetsline(fd,1000MAX_LINE_SIZE,10,v),
catch(e)
{"Error search line (code=",e,"): "},get str error
543

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.