home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.pascal.borland      Borland Pascal was actually pretty neat      2,978 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,497 of 2,978   
   Jochen to All   
   Re: ReadOnly files   
   04 Apr 05 14:20:07   
   
   From: jotel99@hotmail.com   
      
   Hello Ruud!   
      
   >> you have to set the global "filemode" variable to 0 before calling   
   >> reset.   
   > Never heard of that, but it worked :)   
      
   But keep in mind that it is global variable.   
   Best way to use it imho:   
      
   ...   
   oldfilemode := filemode;   
   filemode := 0;   
   resef(f [,...]];   
   filemode := oldfilemode;   
   ...   
      
      
   >> IMHO, that deserves to be put in the mFAQ, even though it is TSFAQP   
   >> #34 in a more extensive fashion..   
   > TSFAQP #34 ???   
      
   ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip   
   "tsfaqp.zip" = Common Turbo Pascal Questions and Timo's answers (Timo   
   Salmi)   
   #34 is in file faqpas2.txt   
      
   But esp that one has an error. You can open readonly textfiles.   
   Of course you can use it for textfiles too - but you do not have too.   
      
   - - - -   
   program testio;   
      
   var   
     f: file;   
     t: text;   
      
   begin   
     writeln('testing textfile ...');   
     assign(t,'c:\t.txt'); {readonly file}   
     reset(t);   
     writeln('file opened');   
     close(t);   
     writeln('testing file [of ...] ...');   
     assign(f,'c:\t.txt'); {readonly file}   
     reset(f,1);   
     {Ooooops ... }   
     writeln('file opened');   
     readln   
   end.   
   - - - -   
      
   greetz   
   jo   
      
   --   
   http://radio789.net.ms - Radio 789 - We play it ALL   
   Radiostream: http://stream789.net.ms   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca