Sign in Join
Wiki copytemporary

Standard Pascal/ja: what changed

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

Title: Standard Pascal/ja

OldNewLine
1+**標準Pascal**とは、[[Compiler|Pascal翻訳系が]][[Pascal]]言語に対応するための最小限の仕様です。 国際標準化機構がISO/IEC 7185:1990 “Information technology – Programming languages – Pascal”を発行しています。 その技術的内容を変更しない邦訳が,JIS X 3008「プログラム言語Pascal」として発行されています。
2+
3+## 概要
4+
5+標準翻訳系では、以下の[[Keyword|予約語に]]対応します。:
6+
7+
8+[[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]]
9+
10+以下の演算子も、仕様の一部です。:
11+
12+
13+`:=` ([[Becomes|代入]]) · `=` ([[Equal|等しい]]) · `>` ([[Greater than|より大きい]]) · `<` ([[Less than|より小さい]]) · `<>` ([[Not equal|等しくない]])
14+
15+また、以下の予約語も追加しています。これらは標準Pascalの一部でありませんが、[[FPC|FPCでは]]、オブジェクトの実装や、C++から発展した例外処理との互換性、また、[[Borland Pascal|Borland Pascalや]]初期のPascal翻訳系との互換性のために使用します。:
16+
17+
18+[[Implementation|implementation]] · [[Finally|finally]] · [[Try|try]] · [[Unit|unit]]
19+
20+## 型
21+
22+標準Pascalでは以下の型が定義されています。
23+
24+- 単純型
25+ - 整数型`integer`
26+ - 実数型`real`
27+ - 論理型`Boolean`
28+ - 文字型`char`
29+
30+- - 列挙型
31+
32+- 構造型
33+ - 配列型`array`
34+ - レコード型`record`
35+ - 集合型`set`
36+ - ファイル型`file`
37+
38+- ポインタ型
39+
40+## 演算子
41+
42+標準Pascalでは以下の演算子が定義されています。
43+
44+### 算術演算子
45+
46+#### 単項算術演算
47+
48+<table>
49+<thead>
50+<tr>
51+<th>演算子</th>
52+<th>被演算子の型</th>
53+<th>結果の型</th>
54+</tr>
55+</thead>
56+<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>
65+</tbody>
66+</table>
67+
68+#### 二項算術演算子
69+
70+<table>
71+<thead>
72+<tr>
73+<th>演算子</th>
74+<th>被演算子の型</th>
75+<th>結果の型</th>
76+</tr>
77+</thead>
78+<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>
102+</tbody>
103+</table>
104+
105+## Free Pascalが対応している方式
106+
107+Free 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]]方式へ対応することが検討されています。
108+
109+## 外部リンク
110+
111+- [ISO 7185:1990 - Information technology -- Programming languages -- Pascal](https://www.iso.org/standard/13802.html) - 標準Pascal規格書の取扱頁です(国際標準化機構)。
112+ - [ISO/IEC 10206:1991 - Information technology -- Progamming languages -- Extended Pascal](https://www.iso.org/standard/18237.html) - 拡張Pascal規格書の取扱頁です(国際標準化機構)。
113+- [JIS X 3008:1994 プログラム言語Pascal](https://webdesk.jsa.or.jp/books/W11M0090/index/?bunsyo_id=JIS%20X%203008:1994) - 標準Pascal規格書の取扱頁です(日本規格協会)。
114+- [ANSI-ISO PASCAL](http://www.standardpascal.org) - ISO 7185標準Pascalを中心に算譜や算法の解説・紹介しています。
115+
116+---
117+*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