rtorrent-ps icon indicating copy to clipboard operation
rtorrent-ps copied to clipboard

Add new `case` command

Open pyroscope opened this issue 6 years ago • 0 comments

case = ‹expression›, {‹val1›, ‹cmd1›[, …]} […] [, {(otherwise), ‹default1›[, …]}]

Means we have two new commands. otherwise returns a singleton value and is thus uniquely identifiable.

case goes through the array elements and compares the case expression against the case values, on the first match it executes the associated commands and returns their result. (otherwise) always matches.

pyroscope avatar May 30 '18 20:05 pyroscope