Sign in Join
Wiki copytemporary

Revision 1 of 3, by Kai Burghardt on 8-6-2022. The page as it is now.

Standard Pascal/ja

標準Pascalとは、Pascal翻訳系がPascal言語に対応するための最小限の仕様です。 国際標準化機構がISO/IEC 7185:1990 “Information technology – Programming languages – Pascal”を発行しています。 その技術的内容を変更しない邦訳が,JIS X 3008「プログラム言語Pascal」として発行されています。

概要

標準翻訳系では、以下の予約語に対応します。:

begin · end · for · goto · if · label · repeat · then · until · while · do · type · var

以下の演算子も、仕様の一部です。:

:= (代入) · = (等しい) · > (より大きい) · < (より小さい) · <> (等しくない)

また、以下の予約語も追加しています。これらは標準Pascalの一部でありませんが、FPCでは、オブジェクトの実装や、C++から発展した例外処理との互換性、また、Borland Pascalや初期のPascal翻訳系との互換性のために使用します。:

implementation · finally · try · unit

型

標準Pascalでは以下の型が定義されています。

演算子

標準Pascalでは以下の演算子が定義されています。

算術演算子

単項算術演算

<table> <thead> <tr> <th>演算子</th> <th>被演算子の型</th> <th>結果の型</th> </tr> </thead> <tbody> <tr> <td>恒等<code>+</code></td> <td rowspan="2">整数型・実数型</td> <td rowspan="2">整数型・実数型</td> </tr> <tr> <td>符号反転<code>-</code></td> </tr> </tbody> </table>

二項算術演算子

<table> <thead> <tr> <th>演算子</th> <th>被演算子の型</th> <th>結果の型</th> </tr> </thead> <tbody> <tr> <td>加算<code>+</code></td> <td rowspan="4">整数型・実数型</td> <td rowspan="3">両被演算子が整数型の場合のみ整数型。それ以外は実数型</td> </tr> <tr> <td>減算<code>-</code></td> </tr> <tr> <td>乗算<code>*</code></td> </tr> <tr> <td>除算<code>/</code></td> <td>実数型</td> </tr> <tr> <td>切捨除算<code>div</code></td> <td rowspan="2">整数型</td> <td rowspan="2">整数型</td> </tr> <tr> <td>剰余<code>mod</code></td> </tr> </tbody> </table>

Free Pascalが対応している方式

Free PascalはISO 7185標準Pascalに対応しており,翻訳方式コマンド列オプション-Misoまたはソースコード翻訳系指令{$mode ISO}を用います。ISO 7815対応は3.0.0版より始まりました。将来の版において,ISO/IEC 10206拡張Pascal方式へ対応することが検討されています。

外部リンク


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.