|
16 | 16 |
|
17 | 17 | ∇ r←Version |
18 | 18 | :Access Public Shared |
19 | | - r←'GitHub' '0.3.0.8' '2019-02-17' |
| 19 | + r←'GitHub' '0.3.0.11' '2019-04-16' |
20 | 20 | ∇ |
21 | 21 |
|
22 | 22 | ∇ History |
23 | 23 | :Access Public Shared |
24 | 24 | ⍝ * 0.3.0 |
25 | | - ⍝ * Oktokit support added. |
26 | 25 | ⍝ * Versioning corrected. |
27 | 26 | ⍝ * Documentation polished. |
28 | 27 | ⍝ * :Include ##.APLTreeUtils fixed |
29 | | - ⍝ * Now compatible with 1.50 |
| 28 | + ⍝ * Bug fixes |
| 29 | + ⍝ * `CastTagname2Number` did not accept something like `1.0.2` |
30 | 30 | ⍝ * 0.0.2 |
31 | 31 | ⍝ * Method `GetAllTopics` added. |
32 | 32 | ⍝ * 0.0.1 |
|
158 | 158 | ⍝ Assumptions: |
159 | 159 | ⍝ * `text` may or may not start with a non-digit. All leading non-digit characters are ignored.\\ |
160 | 160 | ⍝ Therefore both `1.2.3` and `v.1.2.3` are valid input. |
| 161 | + ⍝ * None is allowed to start with a zero followd by a non-zero digit. Therefore 1.0.0 is valid input but |
| 162 | + ⍝ 01.02.3, 1.02.3 and 1.2.03 are not. |
161 | 163 | ⍝ * The remaining `text` must consist of nothing but digits and dots. |
162 | 164 | ⍝ * The first two numbers ("major" and "minor") must not be bigger than 99. |
163 | 165 | ⍝ * The third number ("path") must not be bigger than 999. |
|
171 | 173 | ⍝ If the tag name does not fulfil the assumptions the conversion might crash. In that case `⍬` is |
172 | 174 | ⍝ returned as result. |
173 | 175 | number←⍬ |
174 | | - text←{⍵↓⍨+/∧\0=⍵∊⎕D}text |
175 | | - :If 0=+/{+/∧\'0'=⍵}¨'.'Split text |
| 176 | + :If 0<≢text←{⍵↓⍨+/∧\0=⍵∊⎕D}text |
| 177 | + :AndIf 0=+/{(1<⊃≢⍵)∧⊃'0'=1↑⍵}¨'.'Split text |
176 | 178 | (bool vec)←'.'⎕VFI text |
177 | | - :If 3 4∊⍨⍴bool |
178 | | - vec←{⍵↑⍨3⌈4⌊⍴⍵}↑vec |
179 | | - :If 3=⍴vec |
180 | | - :If ∧/100 100 1000>vec |
181 | | - :AndIf 0=number←100 100 1000⊥vec |
182 | | - number←⍬ |
183 | | - :EndIf |
184 | | - :Else |
185 | | - :If ~∧/100 100 1000 100000>vec |
186 | | - number←⍬ |
187 | | - :ElseIf 0=number←100 100 1000 100000⊥vec |
188 | | - number←⍬ |
189 | | - :EndIf |
190 | | - number÷←100000 |
| 179 | + :AndIf 3 4∊⍨⍴bool |
| 180 | + vec←{⍵↑⍨3⌈4⌊⍴⍵}↑vec |
| 181 | + :If 3=⍴vec |
| 182 | + :If ∧/100 100 1000>vec |
| 183 | + :AndIf 0=number←100 100 1000⊥vec |
| 184 | + number←⍬ |
| 185 | + :EndIf |
| 186 | + :Else |
| 187 | + :If ~∧/100 100 1000 100000>vec |
| 188 | + number←⍬ |
| 189 | + :ElseIf 0=number←100 100 1000 100000⊥vec |
| 190 | + number←⍬ |
191 | 191 | :EndIf |
| 192 | + number÷←100000 |
192 | 193 | :EndIf |
193 | 194 | :EndIf |
194 | 195 | ∇ |
|
318 | 319 | ∘∘∘ ⍝ Huuh?! |
319 | 320 | :EndIf |
320 | 321 | :Else |
321 | | - r←⍎'type ⎕JSON filename' |
| 322 | + r←⍎'type ⎕JSON y' |
322 | 323 | :EndIf |
323 | 324 | ∇ |
324 | 325 |
|
|
0 commit comments