[I7 6M62]Rulebook producing a List of Numbers

Hey gang,
Haven’t been around for a while so if this has been covered, just point me in the direction and I’ll be on my way. (I did check here and the bug tracker first but didn’t see it.)
I’m having trouble getting a rule and/or rulebook to return a list of numbers. This is a minimal example:[code]Lab is a room.

The set rules is a number based rulebook producing a list of numbers.

A set rule for a number (called n) (this is the default set rule):
let x be {1, 2};
add n to x;
say “[x].”;
rule succeeds with result x.

Instead of jumping:
let y be 20;
let z be the list of numbers produced by the set rules for y;
say “Boo!”;
say “[z].”.[/code]When compiling to Glulx, I get this:

Then the interpreter freezes and I get this error message:
Glulxe fatal error: Memory access out of range (-7FFFFFD2)
This happens when using either the “… produced by… rule” or “follow… rule” syntaxes:Instead of jumping: let y be 20; follow the set rules for y; say "Boo!"; say "[y].".Obviously, the above example doesn’t actually pass the results back, but it does at least run the rule. When I compile to zcode I get the expected outputs in both cases. This is surely a bug, but I’m not sure where. TIA

It looks like a bug in the code that marshals complex data structures (like lists) when routines are called. I don’t have much clue about that stuff, I’m afraid. You should file it.

If you can rewrite your code to use a global list variable (“Set-result is a list of numbers that varies”), rather than having the rulebook return the list, that should avoid the bug.

Hey Andrew,
Thank you for checking on this. I’ve filed a report here.
I had already tried using a global variable before I saw your post and it works just swimmingly for my purposes. It’s just a little clunkier - looking. Thanks again.