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 2,072 of 2,978   
   Markus Humm to as_giedrius@yahoo.com   
   Re: Procedure   
   08 Mar 06 20:00:49   
   
   From: markus.humm1@freenet.de   
      
   as_giedrius@yahoo.com schrieb:   
   > Please could some one could give me a pascal procedure what rewrites   
   > every word in the text file in reverse order.   
   >   
   As already mentioned: doing homework for others is not being done here,   
   but help is given. The help with the TStringList is usefull for Delphi,   
   but for plain Turbo/Borland Pascal might not be that helpfull.   
      
   For your problem:   
      
   1. learn how to read in files, so look up these things:   
      - assign   
      - reset   
      - writeln   
      - readln   
      - close   
      
   2. reverse is a bit unprecise: reverse every word from back to front ot   
      reverse the order of lines in the file e.g. a file like this:   
      - line1   
      - line2   
      - line3   
      
      would come out as   
      - line 3   
      - line 2   
      - line 1   
      
      The 2nd is harder. For reversing every word look up how strings are   
      build up. For the 2nd I don't know a solution right now   
      
   So if you can read out the text from the file and just display it with   
   writeln then come back for more help. You'll have learned something at   
   that point already.   
      
   Greetings   
      
   Markus   
      
   --- 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