Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/29/06 15:50
Modified:
  09/29/06 15:53

Read: times


 
#125377 - decoder
Responding to: ???'s previous message
{Usage: decoder.exe infile [outfile]
use 0000110100001010 as a separator}

var fi,fo:text;
    s:string;
    b:byte;
    i,j:integer;
begin
  assign(fi,paramstr(1));
  reset(fi);
  assign(fo,paramstr(2));
  rewrite(fo);
  i:=0;
  b:=0;
  repeat
    readln(fi,s);
    for j:=1 to length(s) do begin
      b:=b shl 1;
      if s[j]='1' then inc(b);
      inc(i);
      if i>=8 then begin
        write(fo,chr(b));
        i:=0;
        b:=0;
      end;
    end;
  until eof(fi);
  close(fi);
  close(fo);

end.



List of 8 messages in thread
TopicAuthorDate
Nyari Mas Leo Agung Cahyono            01/01/70 00:00      
   Language!            01/01/70 00:00      
      for me it's clear...            01/01/70 00:00      
   pilang atau tulis bahasa ingris            01/01/70 00:00      
   0101001001100101011100000110110001111001            01/01/70 00:00      
      decoder            01/01/70 00:00      
         And what did you get?            01/01/70 00:00      
            site?            01/01/70 00:00      

Back to Subject List