File tree Expand file tree Collapse file tree 4 files changed +10
-9
lines changed Expand file tree Collapse file tree 4 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 11:Namespace APLTreeUtils
22
3- ⍝ *** Version 5 .0.0 ⋄ 2020-03-03 ***
3+ ⍝ *** Version 6 .0.0 ⋄ 2020-03-21 ***
44⍝ ## Overview
55⍝ Note that `APLTreeUtils` does not work with the Classic edition - it requires Unicode.\\
66⍝ ## Version History
7- ⍝ * 5.0.0
8- ⍝ * `FindPath` redefined, see there.
9- ⍝ * 4.3.0
10- ⍝ * Method `ToNum` introduced
7+ ⍝ * 6.0.0
8+ ⍝ * Renamed: it's now APLTreeUtils.apln rather than APLTreeUtils.dyalog
119⍝ Kai Jaeger - APL Team Ltd.\\
1210⍝ Homepage: <https://github.com/aplteam/APLTreeUtils/>
1311
Original file line number Diff line number Diff line change 1- yesOrNo←{default}∆YesOrNo question;isOkay;answer;add
1+ yesOrNo←{default}∆YesOrNo question;isOkay;answer;add;dtb;answer2
22⍝ Ask a simple question and allows just "Yes" or "No" as answers.
33⍝ You may specify a default via the optional left argument which when specified
44⍝ rules what happens when the user just presses <enter>.
3030 :Repeat
3131 ⍞←question
3232 answer←⍞
33- :If (≢answer)=¯1+≢question ⍝ Did the...
33+ :If answer≡question ⍝ Did... (since version 18.0 trailing blanks are not removed anynmore)
34+ :OrIf (≢answer)=¯1+≢question ⍝ ..the ...
3435 :OrIf 0=≢answer ⍝ ...user just...
35- :OrIf answer≡{⍵↓⍨-+/∧\' '=⌽⍵}⎕PW↓question ⍝ ...press <enter>?
36+ dtb←{⍵↓⍨-+/∧\' '=⌽⍵}
37+ answer2←dtb answer
38+ :OrIf answer2≡((-≢answer2)↑dtb question) ⍝ ...press <enter>?
3639 :If 0≠≢default
3740 yesOrNo←default
3841 isOkay←1
Original file line number Diff line number Diff line change 1- <tool name="APLTreeUtils"> <version>5 .0.0</version> <date>2020-03-03 </date> <container>#.APLTreeUtils</container> <needs> <script>APLTreeUtils</script> <script>FilesAndDirs</script> <script>OS</script> <script>Logger</script> <script>Execute</script> <script development="true">Tester2</script> </needs> <autoload>1</autoload> <scriptOnly>1</scriptOnly> <buildid>1</buildid> <package>1</package></tool>
1+ <tool name="APLTreeUtils"> <version>6 .0.0</version> <date>2020-03-21 </date> <container>#.APLTreeUtils</container> <needs> <script>APLTreeUtils</script> <script>FilesAndDirs</script> <script>OS</script> <script>Logger</script> <script>Execute</script> <script development="true">Tester2</script> </needs> <autoload>1</autoload> <scriptOnly>1</scriptOnly> <buildid>1</buildid> <package>1</package></tool>
You can’t perform that action at this time.
0 commit comments