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

.Net Cobol

$
0
0

What is the difference is using data type condition-value vs type System.Boolean.  For example:

method-id btnSubmit_Click final private (sender as object e as type System.EventArgs).

local-storage section.
01 passwordStrength type Boolean.

invoke txtPassword::Text::IsStrongPassword returning passwordStrength.
evaluate passwordStrength
When false
invoke type MessageBox::Show("Please Enter A Stronger Password", "Password Error", type MessageBoxButtons::OK)
invoke txtPassword::Focus()
invoke txtPassword::Select(0, txtPassword::Text::Length)
when true
invoke LogUserInfo()
end-evaluate
end method.

The above gives me an error 'selection object does not match selection subject' in the evaluate statement.  But yet, when I change the local variable to condition-value instead of System.Boolean there is no error.

This is the called method and

method-id IsStrongPassword(s as string) returning strongpassword as type Boolean extension.
local-storage section.
Evaluate true
When type Regex::IsMatch(s, type HospitalManagementSoftware.Properties.Settings::Default::pwordchar)
set strongpassword to true
end method.


Viewing all articles
Browse latest Browse all 4356

Trending Articles



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