1 | static S xyzIndexToVar(int i) { |
2 | assertTrue(i > 0); |
3 | if (i == 1) ret "X"; |
4 | if (i == 2) ret "Y"; |
5 | if (i == 3) ret "Z"; |
6 | i -= 3; |
7 | if (i <= 26) |
8 | ret "A" + (char) ('A' + i-1); |
9 | fail("var too high"); |
10 | } |
Began life as a copy of #1007682
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1007879 |
Snippet name: | xyzIndexToVar |
Eternal ID of this version: | #1007879/3 |
Text MD5: | 0e373cefcf33cbe3a5fe7fcf7785ba11 |
Author: | stefan |
Category: | javax / formatting |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-04-13 17:20:58 |
Source code size: | 215 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 520 / 535 |
Version history: | 2 change(s) |
Referenced in: | [show references] |