Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Openai/694305e8-d7f8-800e-a8d8-fbf410be6545
(section)
Add languages
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Assistant: 結論から言うね。 === 結論から言うね。 : ただし * 「正しい COBOL なのにエラー」 * 「拡張した方が厳しくなってる」 この2パターンがある。 ==== ### ==== 標準は何度も変わっている: * COBOL68 * COBOL74 * COBOL85 * COBOL2002 * COBOL2014 👉 昔はOKでも、今はNG が存在する。 ===== 昔の COBOL は: ===== * ベンダ拡張 * 曖昧な文法 * ゆるいチェック が多かった。 拡張 COBOL(新しい処理系)は: * 標準寄り * 厳密 * 曖昧さ排除 👉 弾かれる ==== ### ==== 昔: <syntaxhighlight lang="cobol">01 FUNCTION PIC X(10). </syntaxhighlight> 今: * FUNCTION が予約語 * → エラー ===== 昔: ===== <syntaxhighlight lang="cobol">ADD A TO B. </syntaxhighlight> 今: * 型不一致で警告 or エラー ===== <syntaxhighlight lang="cobol">MOVE A B C. ===== </syntaxhighlight> * 昔の独自拡張 * 標準COBOLではNG ===== 昔: ===== <syntaxhighlight lang="cobol">IF A = B MOVE 1 TO C. MOVE 2 TO D. </syntaxhighlight> * 意図と違う流れでも通る 今: * ブロック構文必須で警告 ===== - カラム 1–6:行番号 ===== '' 7:'' * 8–72:コード 自由形式にすると: * 行が壊れる * 意味が変わる ===== - 昔は通った全角記号 ===== * 今は 不正文字 ==== ### ==== * 文法チェック強化 * 未定義動作をエラー化 * 標準非準拠を警告 👉 書いた当時は合法でも、今は違反 ==== ### ==== 多くの処理系にある: * COBOL85 モード * IBM 互換 * 富士通 互換 👉 まずはこれ ===== - まず警告を全部洗う ===== * 次に標準化 ===== 「動いてるコードを現代化しない」 ===== ==== : ==== 拡張 COBOL は その常識を否定する。 もし次に行くなら * 実際に多いエラーTOP10 * IBM → オープン系移行で死ぬ点 * 「動いてるから触るな」問題の現実解 どれいく?
Summary:
Please note that all contributions to freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)