NEWTON

NEWTON


Popular tags

    Writing a "not" operation in Cairo

    Asked

    6 months ago

    14

    views


    0

    How would I write if x is not less that y using

    from starkware.cairo.common.math_cmp import is_le

    This question was originally posted on Triality

      cairocairo-lang

    1 answers

    0

    For the is_le example you would just do the following:

    let (is_sorted) = is_le(curr_value, next_value) #get whether the curr_val is less than or equal to the next_val

    if is_sorted == 1: # if is_sorted is 0, then curr_val is not less than or equal to next_val

    #do some logic

    end

    

    The general question of how to do a not operation in a conditional, I am not sure

    This answer was originally posted on Triality

    answered

    6 months ago

    Your answer

    NEWTON

    NEWTON