Quantcast
Channel: Visual COBOL
Viewing all articles
Browse latest Browse all 5819

Forum Post: RE: IIF

$
0
0
We don't have any direct equivalent for this in COBOL syntax.  Of course, it's possible to do this in two lines in COBOL: declare ReturnValue as string if Expression set ReturnValue to TruePart else set ReturnValue to FalsePart end-if ...but probably most people would split this and use normal indentation for the sake of readability. I think the C# (and C) '?' syntax is probably most useful in contexts like parameter passing, and it's certainly possible we might want to add a construct like this to the language at some point.

Viewing all articles
Browse latest Browse all 5819

Trending Articles



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