View Issue Details

IDProjectCategoryView StatusLast Update
0000367LDMud 3.3Efunspublic2009-05-05 13:50
Reporterbubbs Assigned Tofufu  
PrioritynormalSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Summary0000367: map(mixed *array, mapping mapp, int index)
DescriptionCurrently, map(array, mapp) works nicely.

A logical extension is map(array, mapp, index), which would translate to a specified mapping value.
TagsNo tags attached.

Activities

zesstra

2009-03-04 16:55

administrator   ~0000980

Maybe it is too late right now, but I think, I don't understand this right. If you want to deal with only one entry, why using map() at all? Could you give an example?

Gnomi

2009-03-04 17:01

manager   ~0000982

The index is for mappings with a width > 1. Currently the value of the first column is used, with that parameter the values of column <index> will be taken.

bubbs

2009-03-04 17:19

reporter   ~0000983

Last edited: 2009-03-04 17:24

Yes, that's exactly it, Gnomi.

Example;
  mapping names =
    ([
      0: "zero"; "null",
      1: "one"; "eins",
      2: "two"; "zwei",
      3: "three"; "drei",
    ]);

  string *en_names = map(({ 2, 3, }), names, 0); // ({ "two", "three", })
  string *de_names = map(({ 2, 3, }), names, 1); // ({ "zwei", "drei", })

fufu

2009-03-13 13:36

manager   ~0000992

This makes sense to me. I'll implement this if there are no objections.

zesstra

2009-03-13 14:18

administrator   ~0000993

No objection from me, would have taken it as soon I got rid of my other stuff. ;-)

fufu

2009-03-15 08:11

manager   ~0001001

Done in svn rev. 2532

Issue History

Date Modified Username Field Change
2005-02-20 11:51 bubbs New Issue
2009-03-04 16:55 zesstra Note Added: 0000980
2009-03-04 16:55 zesstra Status new => feedback
2009-03-04 17:01 Gnomi Note Added: 0000982
2009-03-04 17:19 bubbs Note Added: 0000983
2009-03-04 17:24 bubbs Note Edited: 0000983
2009-03-13 13:35 fufu Status feedback => assigned
2009-03-13 13:35 fufu Assigned To => fufu
2009-03-13 13:36 fufu Note Added: 0000992
2009-03-13 14:18 zesstra Note Added: 0000993
2009-03-15 08:11 fufu Note Added: 0001001
2009-03-15 08:11 fufu Status assigned => resolved
2009-03-15 08:11 fufu Resolution open => fixed
2009-05-05 13:50 zesstra Project LDMud => LDMud 3.3