Annotation of researchv10dc/cmd/icon/src/iconx/ovalue.c, revision 1.1.1.1

1.1       root        1: /*
                      2:  * File: ovalue.c
                      3:  *  Contents: nonnull, null, value
                      4:  */
                      5: 
                      6: #include "../h/rt.h"
                      7: 
                      8: /*
                      9:  * \x - test x for nonnull value.
                     10:  */
                     11: 
                     12: OpDcl(nonnull,1,"\\")
                     13:    {
                     14: 
                     15:    /*
                     16:     * If x is not null, it is returned, otherwise, the function fails.
                     17:     *  Because the pre-dereference value of x is the return value (if
                     18:     *  any), x is copied into Arg0.
                     19:     */
                     20:    Arg0 = Arg1;
                     21:    DeRef(Arg1);
                     22:    if (ChkNull(Arg1))
                     23:       Fail;
                     24:    Return;
                     25:    }
                     26: 
                     27: 
                     28: /*
                     29:  * /x - test x for null value.
                     30:  */
                     31: 
                     32: OpDcl(null,1,"/")
                     33:    {
                     34: 
                     35:    /*
                     36:     * If x is null, it is returned, otherwise, the function fails.
                     37:     *  Because the pre-dereference value of x is the return value (if
                     38:     *  any), x is copied into Arg0.
                     39:     */
                     40:    Arg0 = Arg1;
                     41:    DeRef(Arg1);
                     42:    if (!ChkNull(Arg1))
                     43:       Fail;
                     44:    Return;
                     45:    }
                     46: 
                     47: 
                     48: /*
                     49:  * .x - produce value of x by dereferencing it.
                     50:  */
                     51: 
                     52: OpDcl(value,1,".")
                     53:    {
                     54: 
                     55:    Arg0 = Arg1;
                     56:    Return;
                     57:    }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.