Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • inform6lib inform6lib
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 15
    • Issues 15
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • David Griffith
  • inform6libinform6lib
  • Issues
  • #135
Closed
Open
Issue created Aug 31, 2022 by Fredrik Ramsberg@framsberg

lt_value is set too late for list_together

I'm using library 6.12.6.

The way I read DM4, I should be able to write a list_together routine which prints all information on all the objects in the group when called with inventory_stage=1.

lt_value is set on line 420 of verblib.h. This is after calling the list_together routine with inventory_stage=1. Due to this, NextEntry() does not work as described, and it keeps returning objects after the last it should have returned.

An example game, which demostrates this:

Constant Story      "List Together";
Constant Headline   "^A demonstration of list_together.^";

Statusline score;

Include "parser";
Include "verblib";
Include "grammar";

Class Stone
	with
		list_together [ _obj;
			if(inventory_stage == 1) {
				print "a bunch of stonez (";
				for(_obj=parser_one: _obj ~= 0: _obj = NextEntry(_obj, parser_two)) {
					if(_obj ~= parser_one) print ", ";
					print (address) (_obj.&name-->0);
				}
				print ")";
				if(c_style & NEWLINE_BIT)
					new_line;
				rtrue;
			}
		];

Object StoneShop "The Stone Shop"
	with
		description "You are in a stone shop."
	has light;

Stone -> BlackStone "black stone"
	with
		name 'black' 'stone';

Stone -> PurpleStone "purple stone"
	with
		name 'purple' 'stone';

Stone -> RedStone "red stone"
	with
		name 'red' 'stone';

Object -> Flower "flower"
	with
		name 'flower';

Object -> Hat "hat"
	with
		name 'hat';

[Initialise; ! i;
	location = StoneShop;
	print "^^And so the story begins...^^";
];
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking