Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Unanswered
Is there a ternary operator in FunC?


There is such an operator; the documentation calls ita "conditional operator".

https://ton.org/docs/develop/func/statements#conditional-operator

This is the example provided:

;; <condition> ? <consequence> : <alternative>
x > 0 ? x * fac(x - 1) : 1;
1
1
Posted one year ago
Edited one year ago
Jeremy
394 × 5 Administrator
  
  

Just remember to use space around ? and :.

Behrang Norouzinia   one year ago Report
314 Views
0 Answers
one year ago
one year ago