"함수 define()"의 두 판 사이의 차이

잔글 (Jmnote 사용자가 함수 define 문서를 함수 define() 문서로 옮겼습니다)
1번째 줄: 1번째 줄:
==C==
[[category: C]]
<source lang='C'>
#define PI 3.14159265358979323846
</source>
#define GREET "Hello"
...
printf("%s, World", GREET);
// Hello, World
</source>
==Java==
[[category: Java]]
<source lang='java'>
public static final double PI = 3.141592653589793;
</source>


==PHP==
==PHP==

2017년 8월 12일 (토) 21:02 판

1 C

#define PI 3.14159265358979323846
  1. define GREET "Hello"

... printf("%s, World", GREET); // Hello, World </source>

2 Java

public static final double PI = 3.141592653589793;

3 PHP

define('GREETING', 'Hello world.');
echo GREETING;
// Hello world.

4 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}