게시판 인덱스

 
 FAQFAQ   검색검색   멤버리스트멤버리스트   사용자 그룹사용자 그룹   사용자 등록하기사용자 등록하기 
 개인 정보개인 정보   비공개 메시지를 확인하려면 로그인하십시오비공개 메시지를 확인하려면 로그인하십시오   로그인로그인 

[HW3] Question on LESS operation

 
이 게시판은 잠겼으므로 글을 올리거나, 답변을 하거나 수정을 할 수 없습니다   이 주제는 잠겼으므로 답변을 하거나 수정을 할 수 없습니다     게시판 인덱스 -> 4190.310 Programming Languages (Spring 2023)
이전 주제 보기 :: 다음 주제 보기  
글쓴이 메시지
abebe



가입: 2023년 3월 15일
올린 글: 4

올리기올려짐: 2023년4월4일 20:03    주제: [HW3] Question on LESS operation 인용과 함께 답변

Hello,

"두 값의 대소를 비교할 경우 둘 다 정수 값이 아니면 타입 에러입니다."

I saw the above statement in the additional description for HW3 and I couldn't understand what it means.
Does it mean if two values (at least one not int) are compared with operator LESS, we should raise type error?


Thank you,
Dawit F. Amanu
위로
사용자 정보 보기 비밀 메시지 보내기
김도형



가입: 2022년 3월 8일
올린 글: 103

올리기올려짐: 2023년4월5일 11:16    주제: 인용과 함께 답변

Hello.

Answer for this question is Yes, and you must consider the difference between EQUAL and LESS to understand.

We know that 1 and true aren't same, but we can't define which one is bigger.

This is because comparing operator is a kind of method defined in one type, and cannot be used to elements outside that type set - unless it is expanded.

(To understand more, I recommend you search for order in set theory.)

Hence, in K--, 1 EQUAL true makes the result value 'false', but comparing by LESS makes type error, making no result value.
위로
사용자 정보 보기 비밀 메시지 보내기
이전 글 표시:   
이 게시판은 잠겼으므로 글을 올리거나, 답변을 하거나 수정을 할 수 없습니다   이 주제는 잠겼으므로 답변을 하거나 수정을 할 수 없습니다     게시판 인덱스 -> 4190.310 Programming Languages (Spring 2023) 시간대: GMT + 9 시간(한국)
페이지 11

 
건너뛰기:  
새로운 주제를 올릴 수 없습니다
답글을 올릴 수 없습니다
주제를 수정할 수 없습니다
올린 글을 삭제할 수 없습니다
투표를 할 수 없습니다


Powered by phpBB 2.0.21-7 (Debian) © 2001, 2005 phpBB Group
Translated by kss & drssay