~tristan957/toption

7061b524d271b1a537780a66377b7667dd5748c1 — Tristan Partin 8 months ago 5ccf2f6
Add another usage example
1 files changed, 8 insertions(+), 2 deletions(-)

M README.md
M README.md => README.md +8 -2
@@ 19,10 19,16 @@ int
main(int argc, const char **argv)
{
    int my_value = 64;
    TOption *opt = t_option_from(opt);
    const int the_value = t_option_get_int(opt);
    TOption *opt1 = t_option_from(opt);
    const int the_value = t_option_get_int(opt1);
    assert(the_value == my_value);

    TOption *opt2 = my_func();
    if (t_option_is_none(opt2))
        // stuff
    else
        // other stuff

    return 0;
}
```