| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Aaargh! |
>The problem here is that SEEK won't work on text file, so I use untyped >files. And READ and READLN won't work on untyped files, so I need to use >text files... You could either convert the tagline file to a typed file say type tagrec = string[80]; .... while not eof(tfile) do begin ReadLn(tfile,s); tag := s; write(tagfile,tag); end; or create an index, and treat the existing of text file as an untyped file, you will need something like: type tagidx = record offset : longint; len : byte; (* One line taglines assumed *) end; using filepos to work out the offset, and reading until you get to a chr(13) chr(10) to get the length. then to recover the taglne you want: assign(tfile,'taglines.txt'); reset(tfile,1); seek(tfile,index.offset); blockread(tfile,char_ary,index.len); .... I hope you find these snippets of code useful, gives a yell if ya have any trouble.. --- MAXBoard/SquMAX v0.09b* Origin: The Lamp (Christian) BBS, Auckland, New Zealand (3:772/1175) SEEN-BY: 633/267 270 @PATH: 772/1175 140 1 20 712/624 517 515 711/808 50/99 635/544 727 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.