Re: [fpc-pascal]opening files from a text list

2003-11-27 Thread Marco van de Voort
> On Fri, 28 Nov 2003, Anton Tichawa wrote: > > > function scanblack(var s: string): string; > > var > > i: integer; > > begin > > i := 1; > > repeat > > if i > length(s) then begin > > break; > > end; > > if s[i] = ' ' then begin > > break; > > end; > > inc(i

Re: [fpc-pascal]opening files from a text list

2003-11-27 Thread DONALD PEDDER
On Fri, 28 Nov 2003, Anton Tichawa wrote: > function scanblack(var s: string): string; > var > i: integer; > begin > i := 1; > repeat > if i > length(s) then begin > break; > end; > if s[i] = ' ' then begin > break; > end; > inc(i); > until false; > result

Re: [fpc-pascal]opening files from a text list

2003-11-27 Thread Anton Tichawa
Hello! >If I have a file which contains on the first line... > > 49ers at Giants 16 13 > >I want to open a file called "49ers" and a file called "Giants" and do > some processing. Although FP handles strings, I believe that you can still > only read a character at a time, so I don't know h

[fpc-pascal]opening files from a text list

2003-11-27 Thread DONALD PEDDER
As per my last question to the list, I'm sure there's a way to do this, but I'm not sure how. Last time I got a quick answer after I'd spent ages trying to work it out myself, so I'll ask first this time, instead of banging my head against the keyboard. :-) I'll use the actual example I am w