1 | static S ctxGetVar(S name) {
|
2 | S value = null; |
3 | if (eq(name, "questioncount")) |
4 | value = str(ctxContext().conversationLength); |
5 | if (value == null) |
6 | value = ctxContext().vars.get(name); |
7 | if (value == null) |
8 | value = ctxContext().globals.get(name); |
9 | if (value == null && name.startsWith("MATCH") && isInteger(name.substring(5)))
|
10 | value = get(ctxContext().matches, parseInt(name.substring(5))-1); |
11 | print("ctxGetVar " + name + " = " + sfu(value));
|
12 | ret value; |
13 | } |
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: | #1008982 |
| Snippet name: | ctxGetVar |
| Eternal ID of this version: | #1008982/10 |
| Text MD5: | 94f245093945ba60436b47cb3cc920bc |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-07-04 18:17:04 |
| Source code size: | 485 bytes / 13 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 771 / 793 |
| Version history: | 9 change(s) |
| Referenced in: | [show references] |