Chuck(G)
25k Member
About the PERFORM statement (there are lots of variations).
Given paragraphs named P1...P10: You can enter any of the paragraphs and execute them in sequence with a GOTO and drop out the bottom (P10), or you can treat them as parts of a subroutine (PERFORM ...THRU...). I'm not aware of any other HLL that allows this sort of thing--of course, you can code workarounds that accomplish the same thing.
COBOL's rules for data conversion can be rather complex. Note also that decimal and binary arithmetic is explicitly supported, as well as fixed-point (not simply integer, but scaled integers with a specified decimal point). PICTURE clauses in the Data Division are particularly powerful. PL/I adopted much of this from COBOL--and you can even see a bit of it in PL/M.
Of course, you can emulate this in any language that claims Turing completeness, even Brainf*ck.
Given paragraphs named P1...P10: You can enter any of the paragraphs and execute them in sequence with a GOTO and drop out the bottom (P10), or you can treat them as parts of a subroutine (PERFORM ...THRU...). I'm not aware of any other HLL that allows this sort of thing--of course, you can code workarounds that accomplish the same thing.
COBOL's rules for data conversion can be rather complex. Note also that decimal and binary arithmetic is explicitly supported, as well as fixed-point (not simply integer, but scaled integers with a specified decimal point). PICTURE clauses in the Data Division are particularly powerful. PL/I adopted much of this from COBOL--and you can even see a bit of it in PL/M.
Of course, you can emulate this in any language that claims Turing completeness, even Brainf*ck.