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

96번째 줄: 96번째 줄:
==R==
==R==
[[분류: R]]
[[분류: R]]
{{참고|R print()}}
<source lang='r'>
<source lang='r'>
print(1)
print(1)

2019년 4월 14일 (일) 18:05 판

  다른 뜻에 대해서는 리눅스 echo 문서를 참조하십시오.
echo
print
Write

1 Bash

echo "Hello World!"
# Hello World!
STR="Hello World!"
echo $STR
# Hello World!
echo -n 123
echo -n ABC
# 123ABC

2 C#

Console.Write("Hello");

3 Java

System.out.print("hello");

4 JavaScript

document.write("hello");

5 Perl

print 'hello';

6 PHP

echo 'hello';
echo "hello";
echo('hello');
echo("hello");

$greeting = 'hello';
$greeting = "hello";
echo $greeting;
echo "$greeting";
echo '123';
echo 'ABC';
// 123ABC
print 'hello';

7 PowerShell

Write-Host "Hello world!"

8 Python

  • Python 2.x
import sys
sys.stdout.write("hello")
  • Python 3.x
print('hello')
print("hello")
print("hello", end="")
# hello
print("hello","world")
# hello world
print("hello", "world", end="123")
# hello world123

9 R

print(1)
## [1] 1
print(1:3)
## [1] 1 2 3
print('hello')
## [1] "hello"
print("hello")
## [1] "hello"

10 Ruby

print "hello"
# hello
print "123"
print "ABC"
# 123ABC

11 VB

PRINT "hello"

12 같이 보기