function check (const p : unit) : int is block { var result : int := 0; if amount = 100000000mutez then result := 42 else result := 0 } with result