Use of "conditional" vs "imperative" statements

This is a discussion on Use of "conditional" vs "imperative" statements within the cobol forums in Programming Languages category; As a sort-of follow-up to both the END-PERFORM and EVALUATE threads, I just thought that I would mention exactly HOW limited the use of "conditional" statements are in Standard-conforming (ANSI/ISO - any year) COBOL source code is: A conditional statement may be used: 1) at the end of a series of statements within a sentence. (It may be preceded by 0-n imperative statements, but MUST be followed by a period/full-stop). 2) Within either the IF or ELSE phrases of an IF statement. 3) (sort-of) When actually considered as an imperative statement because it is terminated by its scope-terminator. *** Other ...

Go Back   Application Development Forum > Programming Languages > cobol

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 07-09-2008, 01:20 PM
William M. Klein
Guest
 
Default Use of "conditional" vs "imperative" statements

As a sort-of follow-up to both the END-PERFORM and EVALUATE threads, I just
thought that I would mention exactly HOW limited the use of "conditional"
statements are in Standard-conforming (ANSI/ISO - any year) COBOL source code
is:

A conditional statement may be used:

1) at the end of a series of statements within a sentence. (It may be preceded
by 0-n imperative statements, but MUST be followed by a period/full-stop).

2) Within either the IF or ELSE phrases of an IF statement.

3) (sort-of) When actually considered as an imperative statement because it is
terminated by its scope-terminator.

***

Other than that, standard-conforming source code ALWAYS requires imperative
statement. This is why the addition of scope-terminators in the '85 Standard so
SIGNIFICANTLY increased the use of conditional-statements (that were turned into
imperative statements).

--
Bill Klein
wmklein <at> ix.netcom.com


Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 07:03 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.