Board index » delphi » heres a {*word*218}
Matt Hoyle
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
|
Matt Hoyle
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
heres a {*word*218}
I need to reset a text file but whenever I put
reset(f) then try to access it readln(a, firstline) I get a "File not open for input" append(f) puts the pointer at the end Can i move the pointer to the start some other way? Thanks |
Jeff Freema
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:heres a {*word*218}QuoteMatt Hoyle wrote in message <37049E79.8BE30...@webone.com.au>... Make sure you are accessing the correct file. readln(f, firstline) Hope this helps. Jeff Freeman |
Mike McWhinn
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:heres a {*word*218}QuoteMatt Hoyle <m...@webone.com.au> wrote: If you have two variables, a and f defined as type text, this might be your problem. Also, if you closed the file somewhere before the readln() you could get the error as well. Reset(f) would be the idea way that I know of to put the file pointer back to the beginning of the file. Hope this helps, |
Mike{*word*106}s
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:heres a {*word*218}QuoteIn article <37049E79.8BE30...@webone.com.au> m...@webone.com.au wrote... Mike{*word*106}son, Black Cat Software Factory, Edinburgh, Scotland |
Matt Hoyl
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:heres a {*word*218}Sorry, That was just a typo. I have the variable assigned as begin begin I cant use seek or anything and this seems not to be working :( Thanks QuoteMike McWhinney wrote: |
Ing. Franz Glase
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:heres a {*word*218}QuoteMatt Hoyle wrote: Quote> begin Quote
A text file is made as a "serial" file. There is no means to For random files use a file of char or an untyped file with |
Rich Pasc
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:heres a {*word*218}QuoteMatt Hoyle wrote: var |
Matt Hoyl
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:heres a {*word*218}It was a typo:( QuoteMike{*word*106}son wrote: |
Matt Hoyl
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:heres a {*word*218}Thanks for the info, I have been using types files recently so just assumed it would work the same in text files. So does this mean there no way easy way to write a pascal search and replace program then? Do i have to read the entire file into variables then do the search/replace then rewrite the file and write all the variables back in again. Matt Hoyle Quote"Ing. Franz Glaser" wrote: |
Ing. Franz Glase
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:heres a {*word*218}QuoteMatt Hoyle wrote: can be different in length, the text may contain control characters and Esc - codes, tabs and delimiters. Where would you like to write the replaced string if it was If you want to write a search/replace routine you must first be Whenever there is a chance that the text modified the size, you YOU simply use the WRONG filetype, there is no reason |
Pedt Scrag
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:heres a {*word*218}Matt Hoyle [mailto:m...@webone.com.au] decided to regale us with Quote>Thanks for the info, I have been using types files recently so just 1. Use Text Files and read each line individually from one file, check 2. Use the type "file" and use blockread into a buffer. Search the block Whichever way you do it, you do need to think about the logistics of -- |
Bobby
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:heres a {*word*218}Gee! Someone's taking that discussion a little personal! Quote-- nz Glaser wrote in message <3706A246.32907...@eunet.at>... Quote>http://www.geocities.com/~franzglaser |
Mike{*word*106}s
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:heres a {*word*218}QuoteIn article <3705744E.89CD7...@webone.com.au> m...@webone.com.au wrote... using reset() on a text file, which gives read-only access. You can't write to a text file opened with reset(). You either have to use rewrite() or append(). Mike{*word*106}son, Black Cat Software Factory, Edinburgh, Scotland |
Matt Hoyl
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:heres a {*word*218}hehe, I worked it out the first time, just didn't specify that i knew now that i could work in the middle of text files. QuoteBobby B wrote: |
1. Alt+anykey help...heres an example and ideas?
2. forward command - heres the sample of what I ment
3. sorry..heres my address....:-)
5. Ok heres an explanation of Err 10004, now what
6. Heres a new funky problem....
7. heres the opengl with borland c builder Article how can i usesa picturebox component
8. Stringlist {*word*218} question ?