문제

I was trying this language and I have a question with this code:

cocurrent'local1' 
text1=: 'CCC'
cocurrent'local2'
text1=: 'AAA'

f0=: 3 : 0
  select. y
     case. 1   do. text1
     case. 2   do. cocurrent'local1', 'change'
  end.
)

f0 &.> 1 2 1
┌───┬┬───┐
│AAA││AAA│
└───┴┴───┘

As you can see, the "change" word never came up, but I call f0 with 2 so the change never happened.

What's going on here?

도움이 되었습니까?

해결책

In case 2, you're setting your locale to 'local1change', because 'local1', 'change' concatenates the strings to 'local1change'.

Also, your last cocurrent before f0 is local2, which means f0 is inside local2. You're never leaving local2. I'm not sure why your last 'AAA' happends though, but know that you should set your current locale with cocurrent 'base' (or wherever you started declaring those locales from) before declaring f0.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top