プログラム言語 変数
エスケープ
\' シングルクォーテーション
\" ダブルクォーテーション
\\ \記号
\n 改行
\r リターン
\b バックスペース
\t 水平タブ
\0 NULL文字を表す
	特殊機能
	\l # 次の1文字を小文字にする
	\u # 次の1文字を大文字にする
	\L # \Eまでの文字列を小文字にする
	\U # \Eまでの文字列を大文字にする
	\E # \Lや\Uを終了させる
	特にPerlでは以下の文字についてもエスケープが必要(正規表現利用の為)
	*
	+
	.
	?
	{
	}
	(
	)
	[
	]
	^
	$
	–
	|
	/
	「'」のエスケープ
	my $s = ' Let's Play! ' , '\n' # ⇒ NG
	エスケープ文字「\」を使用
	my $s = ' Let\'s Play! ' , '\n' # ⇒ OK
	q/ 文字列 /を使用
	my $s = q/ Let's Play! / , '\n' # ⇒ OK
	外側に「"」を使用
	my $s = " Let's Play! " , "\n" # ⇒ OK
値渡し・参照渡し
{
int a = 10;
int b = 10;
int c = 10;
SubRoutine(prmA: a, ref refB: b, outC: out c);
	  MessageBox.Show(text: a.ToString()); ⇒10(値渡し)
	  MessageBox.Show(text: b.ToString()); ⇒100(参照渡し)
	  MessageBox.Show(text: c.ToString()); ⇒1000(参照渡し)
	}
	private void SubRoutine(int prmA, ref int refB, out int outC)
	{
	  prmA *= 10;
	  refB *= 10;
	  //outはサブルーチン内で必ず初期化しなければならない
	  int d = outC; outCに値を入れる前に処理しているので×
	  outC *= 10; 同じく×
	  outC = 1000; OK(outCは参照渡し)
	}
  
int v = 10;
fnFunc(v);
→v:10
	void fnFunc(int p)
	{
	 引数受け取り時の処理
	 vの値を格納
	 p = v
	 
	 p += 1;
	 v:10
	 
	 cout << p << '\n';
	 →11
	 return;
	}
	ポインタ渡し
	「プログラム言語 ポインタ/関数への参照渡しポインタ渡し」参照
	参照渡し
	「プログラム言語 ポインタ/関数への参照渡しポインタ渡し」参照
	  Dim a As Integer = 10
	  Dim b As Integer = 10
	  Dim c As Integer = 10
	  Call SubRoutine(prmA:=a, prmB:=b, refC:=c)
	  MessageBox.Show(text:=a.ToString()) ⇒10(値渡し)
	  MessageBox.Show(text:=b.ToString()) ⇒10(値渡し)
	  MessageBox.Show(text:=c.ToString()) ⇒100(参照渡し)
	End Sub
	Private Sub SubRoutine(prmA As Integer, ByVal prmB As Integer, ByRef refC As Integer)
	  prmA *= 10
	  prmB *= 10
	  refC *= 10
	End Sub
  
渡す変数が基本型(プリミティブ型)の場合は値渡し、
参照型の場合は参照渡しになる。
「データ型」参照
	値渡し
	void method(int num){
	 num += 10;
	 System.out.println(num);
	 ⇒20
	}
	int num = 10;
	obj.method(num);
	System.out.println(num);
	⇒10
	※値渡しされている
	参照渡し
	void method(int[] num){
	 num[0] += 10;
	 System.out.println(num);
	 ⇒20
	}
	int[] num = {10};
	obj.method(num);
	System.out.println(num[0]);
	⇒20
	※参照渡しされている
	クラスを引数として渡す場合
	クラス変数を引数として渡す場合
	public class MyClass {
	  private int myInt;
	  public MyClass(int prm)
	  {
	    this.setMyInt(prm);
	  }
	  public int getMyInt() {
	    return this.myInt;
	  }
	  public void setMyInt(int myInt) {
	    this.myInt = myInt;
	  }
	}
	public static void main(String[] args) {
	  
	  MyClass m = new MyClass(10);
	  // m.myInt : 10
	  
	  myFunc(m);
	  // m.myInt : 15
	  // クラスは参照型なので参照渡し
	  
	  myFunc(m.getMyInt());
	  // m.myInt : 15
	  // クラスは参照型でも、インスタンス変数はプリミティブ型なので値渡し
	}
	private static void myFunc(int prm)
	{
	  prm += 5;
	}
	private static void myFunc(MyClass prm)
	{
	  prm.setMyInt(prm.getMyInt() + 5);
	}
  
myfunc(&$prm);
	参照渡し
	myfunc(&$prm);
	function myfunc($prm) {
	 ~
	}
my $x = 5;
a(\$x);
print $x, "\n";
⇒ $x : 50;
sub a {
my $ref = shift;
$$ref *= 10;
}
	値渡し
	my $x = 5;
	b($x);
	print $x, "\n";
	⇒ $x : 5;
	
	sub b {
	  my $val = shift;
	  $val *= 10;
	}
  
変数名
・予約語(if、class等)は使えない。
・数字から初めてはいけない。
・記号は「_」、通貨記号(「¥」,「$」,「£」,「€」等)のみ

