연산자 (프로그래밍): 두 판 사이의 차이

내용 삭제됨 내용 추가됨
편집 요약 없음
편집 요약 없음
1번째 줄:
[[프로그래밍 언어]]는 일반적으로 [[연산 (수학)|수학 연산]]과 유사한 '''연산자'''의 집합을 지원한다. 언어는 내장된 연산자의 정해진 숫자를 포함할 수 있다 (예: [[C와 C++에서 연산자|C와 C++]]에서 + - * =), 아니면 프로그래머가 정의한 연산자의 생성을 허용할 수 있다 (예: [[하스켈]]). 일부 프로그래밍 언어는 다른 <code>[[나눗셈#정수의 나눗셈|'''div''']]</code>와 같은 이름도 허용하는 동안 특수 문자 [[덧셈|'''+''']] 또는 [[대입 (컴퓨터 과학)|''':=''']] 과 같은 연산자 기호를 제한한다 (예: [[파스칼 (프로그래밍 언어)|파스칼]]).
[[Programming languages]] generally support a set of '''operators''' that are similar to [[Operation (mathematics)|operations in mathematics]]. A language may contain a fixed number of built-in operators (e.g. + - * = in [[Operators_in_C_and_C++|C and C++]]), or it may allow the creation of programmer-defined operators (e.g. [[Haskell programming language|Haskell]]). Some programming languages restrict operator symbols to special characters like [[Addition|'''+''']] or [[Assignment (computer science)|''':=''']] while others allow also names like <code>[[Integer_division#Division_of_integers|'''div''']]</code> (e.g. [[Pascal (programming language)|Pascal]]).
 
Some built-in operators supported by a language have a direct mapping to a small number of [[Machine code|instructions]] commonly found on [[central processing units]], though others (''e.g.'' '+' used to express [[string concatenation]]) may have complicated implementations.