안녕하세요 델파이를 이제 막 배우기 시작한 단계인 델파이 초보자인데요.
요며칠 눈팅만 하다가 질문 드릴 것이 있어서 가입 후 첫질문을 남기게 되네요. 잘부탁드립니다(__)
제가 책을 보면서 코드를 따라 해 보고 있는데, 책이랑 코드가 똑같은데도 불구하고 expected but recieved가 계속 나오네요.
자바만 파오다가 처음으로 델파이를 접하게 됐는데 제 눈에는 저게 뭐가 잘못된것인가.. 당최 모르겠어서 답답합니다 ㅜㅜ 에러가 나도 왜 저부분만 나는지도 모르겠고... 도와주세요~
<<코드>>
procedure TForm4.btnInputClick(Sender: TObject);
var
a,b,c : boolean;
y,z : integer;
begin
y := strtoint(edtB.Text);
z := StrToInt(edtC.Text);
//boolean값 추출
a := (StrToInt(edtA.Text) >= 1000) and(strtoint(edtA.Text) <= 100000) and(StrToInt(edtA.Text) mod 10 = 0); //변수 미사용 추출방법
b := ((y >= 10000) and (y <= 100000)) and (y mod 10 = 0); //변수 사용 추출방법
c := ((z >= 10000) and (z <= 100000)) and (z mod 10 = 0);
if (a and b and c) then
begin
StatusBar1.SimpleText := '입력 성공';
end;
else if (not a) and (not b) and (not c) then
begin
StatusBar1.SimpleText := '입력 실패';
end;
else if (not b) and (not c) then
begin
StatusBar1.SimpleText := '이소라와 신동엽의 수당 입력 실패';
end;
else if (not a) and (not c) then
begin
StatusBar1.SimpleText := '엄정화와 신동엽의 수당 입력 실패';
end;
else if (not A) and (not b) then
begin
StatusBar1.SimpleText := '엄정화와 이소라의 수당 입력 실패';
end;
else if (not a) then
begin
StatusBar1.SimpleText := '엄정화의 수당 입력 실패';
end;
else if (not b) then
begin
StatusBar1.SimpleText := '이소라의 수당 입력 실패';
end;
else if (c = false) then
begin
StatusBar1.SimpleText := '신동엽의 수당 입력 실패';
end;
end;
end.
|