static int callAnswerMethod_version; static S callAnswerMethod(S s) { if (callAnswerMethod_version == 0) if (hasMethod(mc(), "answer", "", new L)) callAnswerMethod_version = 1; else if (hasMethod(mc(), "answer", "")) callAnswerMethod_version = 2; else callAnswerMethod_version = -1; if (callAnswerMethod_version == 1) ret (S) callMC("answer", s, emptyList()); else if (callAnswerMethod_version == 2) ret (S) callMC("answer", s); null; } static S callAnswerMethod(O responder, S s) { ret callAnswerMethod(responder, s, litlist(s)); } static S callAnswerMethod(O responder, S s, L<S> history) { S answer = (S) callOpt(responder, "answer", s, history); if (answer == null) answer = (S) callOpt(responder, "answer", s); return emptyToNull(answer); }
Began life as a copy of #1001800
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: | #1002618 |
Snippet name: | callAnswerMethod |
Eternal ID of this version: | #1002618/5 |
Text MD5: | 07777c4bef75093e5078d0fe4c60059b |
Author: | stefan |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-04-24 00:27:38 |
Source code size: | 815 bytes / 25 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 716 / 652 |
Version history: | 4 change(s) |
Referenced in: | #1006641 - pcallAnswerMethod - return "ERROR: ..." on exception #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1011286 - callAnswerFunction - synonym of callAnswerMethod #3000382 - Answer for ferdie (>> t = 1, f = 0) |