Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

Accidental stand-alone "PERFORM" doesn't generate compile error

$
0
0

I've got Micro Focus Visual COBOL for Visual Studio 2010.   While working on a program, I accidentally compiled it while it had a stand-alone (incomplete) PERFORM command.  I was surprised to see that it didn't generate a compile error.

Is that an oversight in the compile logic, or does a stand-alone PERFORM actually do something?

Here's the code I accidentally compiled:

* Here's where we select our sample
IF NOT (M-SEX-CODE = 'F' OR 'M')
GO TO 2000-ENTRY.
****************************************************************
* Go create your user-selected numeric variable INM-NUMVAR
****************************************************************
PERFORM
****************************************************************
* Define the user-selected numeric variable INM-NUMVAR
* It may be a straight numeric variable from T-M (e.g., LOS DAYS)
* or a modified numeric variable (sent-length, 45-yrs life/death)
* or it may be a binary 0-1 (no-yes) var (pct burglars? no-yes)
*****************************************************************
* MOVE M-SERV-DAYS-PRSN-JAIL TO INM-NUMVAR.

MOVE M-SENT-LENGTH-DAYS TO INM-NUMVAR.


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>