홈 › Components › Action Button (행동 버튼) › 화면 3
화면 3. Action Button.lastValue [source]
원본: Computation Layer 문서(Action Button (행동 버튼)) · Try It (원본 화면)
| 화면 번호 | 3 / 12 |
|---|---|
| 문서 항목 설명 (원문) | lastValuekey: string Gets the last value captured for a variable that was defined using the "capture" sink. |
1. 화면 캡처 (빨간 번호 = 아래 표의 번호)
- Capture Vertex
- Make angle C a right angle. Then press "Capture Vertex." Repeat ten times. What do you notice about all the vertices?
2. CL이 입력된 곳
| 번호 | 이름 | 종류 | CL 코드 원문, 번역, 설명 |
|---|---|---|---|
| 1 | historyGraph | 그래프 | # The action button named "captureButton" knows that the "history" of "xCoord" # refers to the number "a" in a graph component that was defined there. # "lastValue" is used similarly to "history", but it sources a single number, # not a list – the last number captured. ▷ "captureButton"이라는 행동 버튼은 "xCoord"의 "기록(history)"이 그곳에서 정의된 그래프 구성요소의 숫자 "a"를 가리킨다는 것을 안다. "lastValue"는 "history"와 비슷하게 쓰지만, 배열(List)이 아니라 숫자 하나, 즉 마지막으로 기록된 숫자를 가져온다. number("a_{recent}"): captureButton.lastValue("xCoord") ▶ 그래프의 변수 a_{recent}는 captureButton이 "xCoord"라는 이름으로 마지막에 기록한 값( |
| 2 | captureButton | 행동 버튼 | # We're telling the action button to capture the variables "a" and "b" # from a graph component named "historyGraph". "xCoord" and "yCoord" # are names that capture, lastValue, and history all share. ▷ 행동 버튼이 "historyGraph"라는 그래프 구성요소의 변수 "a"와 "b"를 기록하도록 한다. "xCoord"와 "yCoord"는 capture, lastValue, history가 모두 함께 쓰는 이름이다. capture("xCoord"): historyGraph.number("a") ▶ "xCoord"라는 이름으로 기록할 값( |