Q&A

  • 파일에서 Readln 말고 한글자씩 읽어오려면
Readln의 경우 한라인씩 읽어오는데 저는요 한글자씩 읽어오고 싶습니다.

방법이 없습니까.

filename:=bible;

assgn(bible,' 경로명');

reset(bible);

readln(bible,textline);

for i:=0 to filesize-1 do

begin

cha:=textline;

if(ord(cha[i]=94) then (j>0) then

begin

onejul:=tempstring;

memo1.lines.add(onejul);

tempstring='';

end

else

tempstring:=tempstring+cha[i];

j:=pos(edit1.text,richedit1.text);

end;

end;

즉 찾는문자열을 하나씩하나씩 비교하는겁니다.

1  COMMENTS
  • Profile
    이정욱 1999.06.26 08:55
    Readln말고 Read나 BlockRead를 사용하시면 원하는 만큼 읽어오실 수 있습니다.



    이소라 께서 말씀하시기를...

    > Readln의 경우 한라인씩 읽어오는데 저는요 한글자씩 읽어오고 싶습니다.

    > 방법이 없습니까.

    > filename:=bible;

    > assgn(bible,' 경로명');

    > reset(bible);

    > readln(bible,textline);

    > for i:=0 to filesize-1 do

    > begin

    > cha:=textline;

    > if(ord(cha[i]=94) then (j>0) then

    > begin

    > onejul:=tempstring;

    > memo1.lines.add(onejul);

    > tempstring='';

    > end

    > else

    > tempstring:=tempstring+cha[i];

    > j:=pos(edit1.text,richedit1.text);

    > end;

    > end;

    > 즉 찾는문자열을 하나씩하나씩 비교하는겁니다.