Sign in Join
Wiki copytemporary

Standard Pascal/ja: what changed

Revision 2 to 3. 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-<thead>
49-
50-</thead>
51-<tbody>
52-
53-</tbody>
48+| 演算子 | 被演算子の型 | 結果の型 |
49+|---|---|---|
50+| 恒等`+` | 整数型・実数型 | 整数型・実数型 |
51+| 符号反転`-` | | |
5452
5553#### 二項算術演算子
5654
57-<thead>
58-
59-</thead>
60-<tbody>
61-
62-</tbody>
55+| 演算子 | 被演算子の型 | 結果の型 |
56+|---|---|---|
57+| 加算`+` | 整数型・実数型 | 両被演算子が整数型の場合のみ整数型。それ以外は実数型 |
58+| 減算`-` | | |
59+| 乗算`*` | | |
60+| 除算`/` | | 実数型 |
61+| 切捨除算`div` | 整数型 | 整数型 |
62+| 剰余`mod` | | |
6363
6464## Free Pascalが対応している方式
6565
6666Free 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]]方式へ対応することが検討されています。
6767
6868## 外部リンク
6969
7070- [ISO 7185:1990 - Information technology -- Programming languages -- Pascal](https://www.iso.org/standard/13802.html) - 標準Pascal規格書の取扱頁です(国際標準化機構)。
7171 - [ISO/IEC 10206:1991 - Information technology -- Progamming languages -- Extended Pascal](https://www.iso.org/standard/18237.html) - 拡張Pascal規格書の取扱頁です(国際標準化機構)。
7272- [JIS X 3008:1994 プログラム言語Pascal](https://webdesk.jsa.or.jp/books/W11M0090/index/?bunsyo_id=JIS%20X%203008:1994) - 標準Pascal規格書の取扱頁です(日本規格協会)。
7373- [ANSI-ISO PASCAL](http://www.standardpascal.org) - ISO 7185標準Pascalを中心に算譜や算法の解説・紹介しています。
7474
7575---
7676*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