https://gitlab.com/tezos/tezos
Raw File
Tip revision: dcc58e5a1ccbb357e0fbaa2f25976fc0292d27f7 authored by Arvid Jakobsson on 29 June 2023, 06:23:30 UTC
TMP/CI: Small build pipeline
Tip revision: dcc58e5
conditionals.tz
parameter (or string (option int));
storage string;
code { CAR;                      # Access the storage
       IF_LEFT {}                # The string is on top of the stack, nothing to do
               { IF_NONE { FAIL}  # Fail if None
                         { PUSH int 0; CMPGT; # Check for negative number
                           IF {FAIL}          # Fail if negative
                              {PUSH string ""}}}; # Push the empty string
       NIL operation; PAIR}                       # Calling convention
back to top