The flip-flop operator is very useful to extract continuous subsets, typically, sections of (multi-line) strings, where the dev defines the delimiters - think of the `=begin` and `=end` keywords.
I've personally never used for anything else than strings, but when I do, it's very useful.
“The form of the flip-flop is an expression that indicates when the flip-flop turns on, .. (or ...), then an expression that indicates when the flip-flop will turn off. While the flip-flop is on it will continue to evaluate to true, and false when off.”
flipflop basically has a hidden boolean variable for state. Btw, while I HAD used it, i still have no idea what's the scope of that state and when it'd reset itself.
cout|1 year ago
I thought I remembered Matz once saying it would be removed, But I could be wrong. Maybe someone uses it.
lmz|1 year ago
pizza234|1 year ago
I've personally never used for anything else than strings, but when I do, it's very useful.
Lammy|1 year ago
“The form of the flip-flop is an expression that indicates when the flip-flop turns on, .. (or ...), then an expression that indicates when the flip-flop will turn off. While the flip-flop is on it will continue to evaluate to true, and false when off.”
pooriar|1 year ago
codesnik|1 year ago