PennMUSH Community

Ticket #7538 (new suggested feature)

Opened 6 months ago

Last modified 6 months ago

align() and space()

Reported by: impster667 Assigned to:
Priority: minor Milestone:
Keywords: Cc:
Visibility: Public

Description

Wouldn't it be better for something like [align(30 30,bob,none)] return bob[space(28)]None[space(26)] instead of "bob None "? That way if you have it in an attrib and U() the attrib it doesn't squish the spaces.

Change History

01/22/08 15:00:48 changed by Talvo

align() is meant to be an output function (the same as space() itself is), so that wouldn't really work. By saving the results of an align() into an attribute and then u()ing it (instead of get()ing it) you're basically forcing it to be evaluated once more than it should be. If you need to save it in an attr and use u() on it rather than get() for something else in the attr, you could use decompose() around the align() (which will convert the spaces into space() calls) so that it can be u()d successfully, like set(obj,attr:foo \[codeThatNeedsUfun(here)] [decompose(align(30 30,bob,none))] bar)