Sign in Join
Wiki copytemporary

Standard Pascal/ja: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11**標準Pascal**とは、[[Compiler|Pascal翻訳系が]][[Pascal]]言語に対応するための最小限の仕様です。 国際標準化機構がISO/IEC 7185:1990 “Information technology – Programming languages – Pascal”を発行しています。 その技術的内容を変更しない邦訳が,JIS X 3008「プログラム言語Pascal」として発行されています。
22
33## 概要
44
55標準翻訳系では、以下の[[Keyword|予約語に]]対応します。:
66
77
88[[Begin|begin]] · [[End|end]] · [[For|for]] · [[Goto|goto]] · [[If|if]] · [[Label|label]] · [[Repeat|repeat]] · [[Then|then]] · [[Until|until]] · [[While|while]] · [[Do|do]] · [[Type|type]] · [[Var|var]]
99
1010以下の演算子も、仕様の一部です。:
1111
1212
1313`:=` ([[Becomes|代入]]) · `=` ([[Equal|等しい]]) · `>` ([[Greater than|より大きい]]) · `<` ([[Less than|より小さい]]) · `<>` ([[Not equal|等しくない]])
1414
1515また、以下の予約語も追加しています。これらは標準Pascalの一部でありませんが、[[FPC|FPCでは]]、オブジェクトの実装や、C++から発展した例外処理との互換性、また、[[Borland Pascal|Borland Pascalや]]初期のPascal翻訳系との互換性のために使用します。:
1616
1717
1818[[Implementation|implementation]] · [[Finally|finally]] · [[Try|try]] · [[Unit|unit]]
1919
2020## 型
2121
2222標準Pascalでは以下の型が定義されています。
2323
2424- 単純型
2525 - 整数型`integer`
2626 - 実数型`real`
2727 - 論理型`Boolean`
2828 - 文字型`char`
2929
3030- - 列挙型
3131
3232- 構造型
3333 - 配列型`array`
3434 - レコード型`record`
3535 - 集合型`set`
3636 - ファイル型`file`
3737
3838- ポインタ型
3939
4040## 演算子
4141
4242標準Pascalでは以下の演算子が定義されています。
4343
4444### 算術演算子
4545
4646#### 単項算術演算
4747
48-<table>
4948<thead>
50-<tr>
51-<th>演算子</th>
52-<th>被演算子の型</th>
53-<th>結果の型</th>
54-</tr>
49+
5550</thead>
5651<tbody>
57-<tr>
58-<td>恒等<code>+</code></td>
59-<td rowspan="2">整数型・実数型</td>
60-<td rowspan="2">整数型・実数型</td>
61-</tr>
62-<tr>
63-<td>符号反転<code>-</code></td>
64-</tr>
52+
6553</tbody>
66-</table>
6754
6855#### 二項算術演算子
6956
70-<table>
7157<thead>
72-<tr>
73-<th>演算子</th>
74-<th>被演算子の型</th>
75-<th>結果の型</th>
76-</tr>
58+
7759</thead>
7860<tbody>
79-<tr>
80-<td>加算<code>+</code></td>
81-<td rowspan="4">整数型・実数型</td>
82-<td rowspan="3">両被演算子が整数型の場合のみ整数型。それ以外は実数型</td>
83-</tr>
84-<tr>
85-<td>減算<code>-</code></td>
86-</tr>
87-<tr>
88-<td>乗算<code>*</code></td>
89-</tr>
90-<tr>
91-<td>除算<code>/</code></td>
92-<td>実数型</td>
93-</tr>
94-<tr>
95-<td>切捨除算<code>div</code></td>
96-<td rowspan="2">整数型</td>
97-<td rowspan="2">整数型</td>
98-</tr>
99-<tr>
100-<td>剰余<code>mod</code></td>
101-</tr>
61+
10262</tbody>
103-</table>
10463
10564## Free Pascalが対応している方式
10665
10766Free PascalはISO 7185標準Pascalに対応しており,[[Compiler Mode|翻訳方式]][[Command-line interface|コマンド列オプション]]**-Miso**または[[Source code|ソースコード]][[Compiler directive|翻訳系指令]][[Mode iso|{$mode ISO}を]]用います。ISO 7815対応は3.0.0版より始まりました。将来の版において,ISO/IEC 10206[[Extended Pascal|拡張Pascal]]方式へ対応することが検討されています。
10867
10968## 外部リンク
11069
11170- [ISO 7185:1990 - Information technology -- Programming languages -- Pascal](https://www.iso.org/standard/13802.html) - 標準Pascal規格書の取扱頁です(国際標準化機構)。
11271 - [ISO/IEC 10206:1991 - Information technology -- Progamming languages -- Extended Pascal](https://www.iso.org/standard/18237.html) - 拡張Pascal規格書の取扱頁です(国際標準化機構)。
11372- [JIS X 3008:1994 プログラム言語Pascal](https://webdesk.jsa.or.jp/books/W11M0090/index/?bunsyo_id=JIS%20X%203008:1994) - 標準Pascal規格書の取扱頁です(日本規格協会)。
11473- [ANSI-ISO PASCAL](http://www.standardpascal.org) - ISO 7185標準Pascalを中心に算譜や算法の解説・紹介しています。
11574
11675---
11776*From the Free Pascal wiki, page "Standard Pascal/ja", as it stood on 2022-08-06 after a change by Kai Burghardt, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history