Created
December 25, 2017 16:55
-
-
Save taraijpn/8656f892937c8a4ba58a4085c4cf0d56 to your computer and use it in GitHub Desktop.
PadTools用の私的初期ドキュメント。公式ページにある例がほとんどです。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:terminal 開始 | |
:comment コメント文 | |
:comment PAD図でGOTOは表現出来ない? | |
ブロック1 | |
ブロック2(1)@ | |
ブロック2(2) | |
:comment ブロック3コメント | |
ブロック3 | |
ブロック3-1 | |
ブロック3-1-1(1)@ | |
ブロック3-1-1(2) | |
:call 関数呼び出し | |
中身 | |
:if 条件式 | |
真の場合 | |
:else | |
偽の場合(:else以下は省略可能) | |
:switch 条件 | |
:case 値1 | |
ケース1の中身 | |
:case 値2 | |
ケース2の中身 | |
:case ... | |
ケースは必要に応じていくつでも追加できます | |
:case default | |
case の値の文字列が重複してはいけません | |
:while 繰り返し条件(先判定) | |
中身 | |
:dowhile 繰り返し条件(後判定) | |
中身 | |
:call forループの表現法 | |
i=0 (for前置処理) | |
:while i<=n (forループ条件) | |
(forの) 中身 | |
i++ (for後置処理) | |
:call forループの表現法2 | |
:while i=0 to n | |
(forの) 中身 | |
to なら i++, downto なら i-- のこと | |
整数ループが明確ならこう書いてもいいかも?@ | |
後置処理が複雑なら前述のように書く。 | |
:terminal :label | |
goto を表現する方法がないので、@ | |
terminal でラベルを表し、@ | |
ラベルを表す文字列の先頭に:をつけ@ | |
ブロックで goto を書きラベル文字列を附記する。@ | |
本来のPADには無制限gotoを表現する方法が無い? | |
:if 飽きた | |
goto :脱出点 | |
goto :label@ | |
:terminal :脱出点 | |
:terminal 終了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment