Hi,
here is an example of wrong cobol source on the internet:
Identical source can be found at ZDnet.
If I try to compile it, there are errors. I am wondering which compiler will compiles that source without errors.
Besides a-margin errors, the compute should be like:
So FAHR should be followed by a space.
One of my compilers said this:
12 IGYPS0009-E "DISPLAY" should not begin in area "A". It was processed as if found in area "B".
Same message on line: 15
13 IGYPS0009-E "ACCEPT" should not begin in area "A". It was processed as if found in area "B".
14 IGYPS0009-E "COMPUTE" should not begin in area "A". It was processed as if found in area "B".
14 IGYPS0013-E "FAHR" was a name that ended with one or more hyphens. The hyphens were discarded.
14 IGYPS2070-E Expected a right parenthesis, but found "32" in the "COMPUTE" statement. A right parenthesis was assumed
before "32".
14 IGYPS2072-S "32" was invalid. Skipped to the next verb, period or procedure-name definition.
16 IGYPS0009-E "GOBACK" should not begin in area "A". It was processed as if found in area "B".
Regards,
Crox
here is an example of wrong cobol source on the internet:
Identical source can be found at ZDnet.
If I try to compile it, there are errors. I am wondering which compiler will compiles that source without errors.
Besides a-margin errors, the compute should be like:
Code:
COMPUTE CENT = (FAHR - 32) * 5 / 9.
One of my compilers said this:
12 IGYPS0009-E "DISPLAY" should not begin in area "A". It was processed as if found in area "B".
Same message on line: 15
13 IGYPS0009-E "ACCEPT" should not begin in area "A". It was processed as if found in area "B".
14 IGYPS0009-E "COMPUTE" should not begin in area "A". It was processed as if found in area "B".
14 IGYPS0013-E "FAHR" was a name that ended with one or more hyphens. The hyphens were discarded.
14 IGYPS2070-E Expected a right parenthesis, but found "32" in the "COMPUTE" statement. A right parenthesis was assumed
before "32".
14 IGYPS2072-S "32" was invalid. Skipped to the next verb, period or procedure-name definition.
16 IGYPS0009-E "GOBACK" should not begin in area "A". It was processed as if found in area "B".
Regards,
Crox