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

RE: Case sensitive

$
0
0

COBOL does not allow data names to differ only by case, but you can distinguish an instance or static field from a method local variable or parameter by using the self:: prefix like this:

working-storage section.

      01 PolicyNumber String property no set.

method-id New.

procedure division using by value PolicyNumber as String.

Set self::PolicyNumber to PolicyNumber.

end method.

If you really want two properties (or public fields to differ only by case, you could use the AS phrase:

      01 PolicyNumber String property no set .

      01 PolicyNumber2 String property no set as "policyNumber".

...but I can't really think of any reasons one might want to do this...


Viewing all articles
Browse latest Browse all 4356

Trending Articles



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