05 - Verify Return Results by Value

by steen_hansen

HTML

<!DOCTYPE html><meta charset="utf-8" />
<title>05 Verify Return Results by Value</title>


<div id='js-div' style="width:50%">
  <a href='https://github.com/steenhansen/type-czech'  target="_blank" class='git-hub'>GitHub Package</a>
  <div id='js-code'>the javascript</div>
</div>


<div id="the-explanation" style="width:50%">
  <div class='an-explantion'>05 - Verify Return Results by Value</div>
  <div id='explanation-text'>
    <br>


    POST function checking is good for invariate verification to give warnings
    when there are issues with the state of the data after a function is called. 
    It is like a detachable assert statement.
  <br><br>
    In the example to the left, two People fail the POST_check_Person() return result check.

    <ul>
      <li>Catherine had incorrect upper and lowercase characters</li>
      <li>Atahualpa does not have a valid regnal number, I, V, or X, in l_name</li>
    </ul>
    <br>



    If only a POST checking function is needed to verify function results, without
    a PRE checking function, then this form must be used. With an undefined serving
    as a placeholder for the uncalled PRE checking function.
<pre>
Person = type_czech.linkUp(Person, undefined, POST_check_Person) 
</pre>



  </div>

  <div id="console-log"  >
    <div class='a-title'>Console Output</div>
    <div id='log-text'></div>
    <br>
  </div>

  <br><br>




<!--            ---------------TYPE 1---------------------------       -->
<script src="https://cdn.jsdelivr.net/gh/steenhansen/type-czech@latest/web-resources/consolelog.js"></script>
<script src="https://cdn.jsdelivr.net/gh/steenhansen/type-czech@latest/web-resources/TypeCzech.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/steenhansen/type-czech@latest/web-resources/type-czech.css">
<!--            ---------------TYPE 1---------------------------       -->
<div id='js-fiddles'>
  <a title="Example-Contents"...