I don't know why it crashes, but I can tell you that you are right in that the error comes from the rank operator. You can see that from the stack trace where it says Bif_OPER2_RANK.
Regards, Elias On 30 Apr 2016 10:36, "Christian Robert" <christian.rob...@polymtl.ca> wrote: > > )load Loto2 > SAVED 2016-04-29 21:57:45 (GMT-4) > > )fns > Loto Randomize > > ⎕CR 'Loto' > z←n Loto a;b > (a b)←a > z←(0,a)⍴0 > Loop: →(n=0)/Sort > z←z⍪a?b > n←¯1+n > →Loop > Sort: z←{⍵[⍋⍵;]} {(⊂⍋⍵)⌷⍵}⍤1 ⊢ z > > > > 5 Loto 6 49 > 1 9 18 21 43 48 > 5 6 10 39 41 44 > 8 18 19 21 36 44 > 14 18 23 31 44 46 > 14 22 28 35 39 46 > > 1 Loto 6 49 > 6 22 24 26 29 42 > > 0 Loto 6 49 > > > ============================================================================== > Assertion failed: 0 > in Function: init > in file: Cell.cc:48 > > Call stack: > > ---------------------------------------- > -- Stack trace at Cell.cc:48 > ---------------------------------------- > 0x7fe31a2f8580 __libc_start_main > 0x444585 main > 0x57d8fd Workspace::immediate_execution(bool) > 0x48d522 Command::process_line() > 0x48d5ea Command::do_APL_expression(UCS_string&) > 0x498615 Executable::execute_body() const > 0x528a90 StateIndicator::run() > 0x4cdd48 Prefix::reduce_statements() > 0x4cd02e Prefix::reduce_MISC_F_B_() > 0x4a0611 DerivedFunction::eval_B(Value_P) > 0x471384 Bif_OPER2_RANK::eval_LRB(Token&, Token&, Value_P) > 0x46f27d Bif_OPER2_RANK::do_LyXB(Function*, Shape const*, > Value_P, int) > 0x46e8b2 Bif_OPER2_RANK::finish_LyXB(EOC_arg&, bool) > 0x47b54a Cell::init(Cell const&, Value&, char const*) > 0x455c48 do_Assert(char const*, char const*, char const*, > int) > ======================================== > > SI stack: > > Depth: 1 > Exec: 0xc33af0 > Safe ex: no > Pmode: ∇ Loto[7] > PC: 49 ← > Stat: Sort: z←{⍵[⍋⍵;]} {(⊂⍋⍵)⌷⍵}⍤1 ⊢ z > err_code: 0x0 > thrown: at StateIndicator.cc:40 > e_msg_1: 'No Error' > e_msg_2: '' > e_msg_3: '' > > Depth: 0 > Exec: 0xc10370 > Safe ex: no > Pmode: ◊ 0 Loto 6 49 > PC: 3 ENDL > Stat: 0 Loto 6 49 > err_code: 0x0 > thrown: at StateIndicator.cc:40 > e_msg_1: 'No Error' > e_msg_2: '' > e_msg_3: '' > > > > ============================================================================== > > > > Juergen, I think the stack trace came from Rank Operator (⍤) but not 100% > sure. > > Xtian. > > To others, any way to remove the Loop in Loto? how? Examples? > >