grey
December 11, 2017, 2:59am
#1
Just digging into my new Teletype. I tried using ELSE with PROB, which didn’t do anything. So I wrote:
Z SCALE 0 16383 0 100 PARAM
X 0
PROB Z: X 1
IF X: SCRIPT 2
ELSE: SCRIPT 3
I can think of lots of uses for a concise:
PROB Z: SCRIPT 2
PELSE: SCRIPT 3
Was just curious if this had been discussed; and a quick search implied, “No.”
jnoble
December 11, 2017, 4:05am
#2
How about:
PROB Z: SCRIPT 2; BREAK
SCRIPT 3
2 Likes
grey
December 11, 2017, 5:08am
#3
I would not guess that to be a functional behavior! I’ll give that a swing.
For a full-fledged switch I always do:
A RAND 100
IF < A 33: //do first case with 0.33 probability
ELIF < A 55: //do next thing with 55-33=22 percent prob.
ELSE: //do this one with 100-55=45 percent prob.
4 Likes
It works! Also note that BREAK
has an alias BRK
.
2 Likes