WeBWorK Problems

Array construction problems, no idea how to fix it

Array construction problems, no idea how to fix it

by Alex Jordan -
Number of replies: 1

Hi Nicole, in the test3 file, you have not made the change that I think is the main issue that I mentioned in the last post. Change line 35 from

$opts = {%$cell};

to

$opts = {@$cell};

After making that change, the problem will render.

For me at least, using the soon-to-be-released version 2.20 of WeBWorK, at this point I see tons of PG warnings that say "Table text must be in cells", which indicate that your string for the table is not using [. and .] surrounding some sort of content within the table.

In reply to Alex Jordan

Array construction problems, no idea how to fix it

by Nicole Wilson -
I have, I believe tracked down the errors in my KmapMaker subroutine or more accurately started over.

I build the subroutine in perl, where it does work, then brought it back to pg.
I have changed all instances of \@arrayName to ~~@arrayName
Is there an easy way to determine if the array returned by my function is correct?
Is there an easy way to determine if the array I am sending as a parameter contains the correct values?