Highlighted
Contributor.
Contributor.
799 views

.Net Cobol

Jump to solution

What is the .net cobol equivalent to the following C# code?  I just need to know the equivalent to the ++ operator and how I would write score++ in .net cobol.

  int score = 1;

if (Regex.Match(password, @"/.[!,@,#,$,%,^,&,*,?,_,~,-,£,(,)]/", RegexOptions.ECMAScript))

  score++;

0 Likes
1 Solution

Accepted Solutions
Highlighted
Honored Contributor.
Honored Contributor.

RE: .Net Cobol

Jump to solution

Unless I am missing something,

you could do this:  Add 1 to score

or this:  Compute score = score + 1

or this:  Set score = score + 1

To my knowledge, there is no built-in increment or decrements operator like there is in c or c#

View solution in original post

0 Likes
2 Replies
Highlighted
Honored Contributor.
Honored Contributor.

RE: .Net Cobol

Jump to solution

Unless I am missing something,

you could do this:  Add 1 to score

or this:  Compute score = score + 1

or this:  Set score = score + 1

To my knowledge, there is no built-in increment or decrements operator like there is in c or c#

View solution in original post

0 Likes
Highlighted
Contributor.
Contributor.

RE: .Net Cobol

Jump to solution

I was seriously overthinking this!

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.