2013年1月10日木曜日

開発環境

『初めてのPHP5』 (David Sklar 著、 桑村 潤 翻訳、 廣川 類 翻訳、 オライリー・ジャパン、2005年、ISBN978-4-87311-257-2)の第 2章(テキストと数の操作)2.5(演習問題)1を解いてみる。

1.

HTML、PHPのソースコード(BBEdit)

sample116.php

<?php
  print 'How are you? ';
  print 'I\'m fine.';
?>

ちなみにJavaScriptの場合。

コード(BBEdit)

var result = 'How are you? ';
result += 'I\'m fine.';
$('#pre0').text(result);




pythonの場合。

sample.py

コード(BBEdit)

#!/usr/bin/env python3.3
#-*- coding: utf-8 -*-

print('How are you? ')
print('I\'m fine.')

入出力結果(Terminal)

$ ./sample.py
How are you? 
I'm fine.
$

0 コメント:

コメントを投稿