亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mappings

?? C實現的MUD,對大家基本入門網絡游戲很有幫助!
??
字號:
Mappings usage                                              1992 September 28

Documentation on MudOS's mapping datatype - written by Truilkan@TMI:

MudOS 0.9 provides a datatype calling the 'mapping'.  Mappings are
the equivalent of associative arrays found in other languages (e.g. Perl).
An associative array is similar to a regular array except that associative
arrays can be indexed by any type of data (string, object, int, array, etc)
rather than just integers.  In addition, associative arrays are sparse arrays
which means you can have a mapping which has a value for its 1,000,000th
element without having values for any other elements.  Two particularly
effective uses for mappings are: 1) databases, and 2) a substitute for the
aggregate type 'struct' (as used in the C language) by representing each
field of the C struct as a key in the mapping.

A mapping is declared like this:

mapping x;

A mapping can be initialized in one of two ways:

   x = ([key0 : value0, key1 : value1, ...]);

   (note: 'x = ([]);' can be used to create an empty mapping)

Note that a mapping _must_ be initialized before you may assign any elements
to it.  This restriction exists because of the way the gamedriver
initializes all variables (regardless of type) to zero (0).  If you do not
initialize the mapping, then you'll see an "Indexing on illegal type" error
when you try to assign an element to the mapping.

New (key, value) pairs may be added to the map in the following way:

x[key] = value;

The above statement causes the driver to search the mapping named 'x' for the
specified key.  If the mapping contains that key, then the associated value
(in the mapping) is replaced with the value on the right hand side of the
assignment.  If the mapping does not already contain that key, then
additional space is automatically allocated (dynamically) and the
(key, value) pair is inserted into the mapping.

An element of a mapping may be referenced as follows:

   write(x[key] + "\n");

An element of a mapping may be deleted as follows:

   map_delete(x, key);

this deletion will cause the following expression to evaluate to true (1):

   undefinedp(x[key])

so that you could write code such as this:

if (undefinedp(value = x["MudOS"])) {
    write("'MudOS' is not used as a key in the mapping 'x'\n");
} else {
    write("the value for the key 'MudOS' is " + value + "\n");
}

A list of the keys (indices) may be obtained using the keys() efun, for
example:

   mixed *idx;
   map x;

   x = ([ "x" : 3, "y" : 4]);
   idx = keys(x);  /* idx == ({"x", "y"}) or ({"y", "x"}) */

Note that keys() will return the list of indices in an apparently random
order (the order is a side effect of the implementation used to store
the mapping -- in this case, an extensible hash table).

A list of the values in a mapping may be obtained using the values()
efun, for example:

   idx = values(x);

causes idx to be equal to ({3, 4}) or ({4, 3}).  Note that values() will
return the values in the same order as keys() returns the corresponding
keys.

The (key, value) pairs in a mapping may be iterated over using the each()
efun.  each() returns a null vector when the end of the mapping is reached.
each() returns the (key, value) pairs in the same order as keys() and values()
do.  For example:

   mixed *pair;

   while ((pair = each(x)) != ({})) {
      write("key   = " + pair[0] + "\n");
      write("value = " + pair[1] + "\n");
   }

Mappings can be two-dimensional (or n-dimensional for that matter) in the same
sense that LPC arrays can be.

   mapping x, y;

   x = ([]);
   y = ([]);

   y["a"] = "c";
   x["b"] = y;

   And then x["b"]["a"]  == "c"

   Mappings can also be composed using the '*' operator (composed in the
   mathematical sense of the word):

   mapping r1, r2, a;

   r1 = ([]);
   r2 = ([]);

   r1["driver"] = "mudlib";
   r2["mudlib"] = "castle";

so:

   a = r1 * r2 

defines a to be a map with: a["driver"] == "castle";

You may also add two mappings.  The sum of two mappings is defined
as the union of the two mappings.

   a = r1 + r2

defines a to be a map with a["driver"] == "mudlib" and
a["mudlib"] == "castle"

The += operator is also supported.  Thus you could use:

   a += ([key : value]);

as a substitute for:

   a[key] = value;

However, the latter form (a[key] = value) is much more efficient since
the former (in the present implementation) involves the creation of a new
mapping while the latter does not.

The subtraction operator is not defined for mappings (use map_delete()).

The sizeof() efun may be used to determine how many (key, value) pairs
are in the mapping.  For example,

   write("The mapping 'x' contains " + sizeof(x) + " elements.\n");

the implementation:

MudOS's mappings are implemented using an extensible hash table.  The
size of the hash table is always a power of 2.  When a certain percentage
of the hash table buckets become full, the size of the hash table is
doubled in order to maintain the efficiency of accesses to the hash
table.

credits:

MudOS's mappings were originally implemented by Whiplash@TMI.  Parts of
the implementation were later rewritten by Truilkan@TMI (to use an
extensible hash table rather than a binary tree).

Parts of the data structure used to implement mappings are based on
the hash.c module from the Perl programming language by Larry Wall.
The Perl package is covered under the GNU Copyleft general public license.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产亚洲一区二区三区| 在线看国产日韩| 亚洲欧洲国产专区| 欧美一级午夜免费电影| 99国产精品久久久久| 久久丁香综合五月国产三级网站| 最新国产成人在线观看| 欧美一卡2卡3卡4卡| 91在线播放网址| 国产激情视频一区二区三区欧美| 香蕉影视欧美成人| 中文字幕在线不卡国产视频| 日韩一区二区三| 欧美艳星brazzers| 9i在线看片成人免费| 国产一区二区免费看| 亚洲视频中文字幕| 国产午夜精品一区二区三区视频| 欧美一区二区三区免费大片| 91福利国产成人精品照片| 国产精华液一区二区三区| 秋霞影院一区二区| 日韩精品免费专区| 日本不卡中文字幕| 偷拍日韩校园综合在线| 亚洲精品免费在线播放| 亚洲三级在线免费观看| 自拍偷拍国产亚洲| 国产精品久久久久一区| 国产精品久久久久久久久久久免费看| 日韩欧美一二区| xnxx国产精品| 日本一区二区三区国色天香| 久久久久国产精品麻豆| 国产精品私人影院| ...xxx性欧美| 亚洲精品成人天堂一二三| 亚洲一区二区欧美| 偷拍亚洲欧洲综合| 视频一区二区三区中文字幕| 日本视频一区二区三区| 久久99久久久久久久久久久| 国产在线一区二区| 99久久婷婷国产综合精品 | 色综合久久88色综合天天6| 99国产精品久久久| 欧美人xxxx| 337p日本欧洲亚洲大胆精品| 国产欧美日韩另类视频免费观看| 国产欧美日韩卡一| 亚洲电影一级黄| 毛片不卡一区二区| youjizz国产精品| 91美女蜜桃在线| 91精品国产黑色紧身裤美女| 欧美变态tickling挠脚心| 国产女人18毛片水真多成人如厕| 亚洲男人天堂av| 国内精品伊人久久久久av影院| 成人动漫中文字幕| 69久久99精品久久久久婷婷 | 日韩精品亚洲一区| 99久久久国产精品免费蜜臀| 一本色道**综合亚洲精品蜜桃冫| 欧美日韩国产色站一区二区三区| 久久综合久久综合久久综合| 亚洲摸摸操操av| 激情欧美一区二区三区在线观看| 成人一区二区三区视频在线观看| 在线观看日产精品| 国产无一区二区| 日韩高清一区二区| 97国产一区二区| 2020国产精品| 日韩影院在线观看| 91麻豆精品国产无毒不卡在线观看 | 欧美一区二区三区人| 亚洲一级不卡视频| 在线观看av不卡| 亚洲精品成人在线| 欧美专区在线观看一区| 亚洲免费资源在线播放| 91女人视频在线观看| 亚洲欧洲在线观看av| 不卡一区二区在线| 亚洲视频一区二区免费在线观看| 不卡av在线免费观看| 国产精品福利影院| 99久久夜色精品国产网站| 亚洲欧美一区二区三区国产精品| 不卡电影一区二区三区| 亚洲欧美成人一区二区三区| 99久久99久久综合| 亚洲动漫第一页| 欧美一级片在线| 精品无人区卡一卡二卡三乱码免费卡| 日韩免费观看高清完整版| 国产专区综合网| 中文字幕在线观看不卡| 欧美视频三区在线播放| 日韩精品高清不卡| 久久精品网站免费观看| 97se狠狠狠综合亚洲狠狠| 亚洲精品成a人| 日韩欧美国产高清| 成人av手机在线观看| 午夜电影网一区| 久久你懂得1024| 在线观看免费成人| 麻豆成人久久精品二区三区小说| 久久综合久久综合亚洲| 91蜜桃婷婷狠狠久久综合9色| 亚洲成人综合网站| 国产午夜精品一区二区三区嫩草| 91亚洲精品久久久蜜桃网站 | 青青草国产成人99久久| 久久综合久久综合亚洲| 色视频一区二区| 极品瑜伽女神91| 亚洲午夜在线电影| 国产欧美中文在线| 欧美一区在线视频| 99国产精品久久久久久久久久久| 午夜精品久久久久影视| 中文字幕不卡的av| 日韩欧美一级二级三级久久久| 成人h精品动漫一区二区三区| 日韩制服丝袜av| 综合av第一页| 国产午夜久久久久| 日韩三级在线观看| 欧美日韩国产中文| 91色.com| 成人激情免费视频| 国产尤物一区二区| 五月综合激情网| 亚洲日本中文字幕区| 久久久久久日产精品| 欧美一卡2卡三卡4卡5免费| 色婷婷综合激情| 成人动漫视频在线| 国产精品亚洲第一区在线暖暖韩国| 亚洲高清免费视频| 亚洲精品国产成人久久av盗摄 | 久久久一区二区三区捆绑**| 欧美性受xxxx黑人xyx性爽| 成人免费福利片| 国产麻豆精品在线观看| 久久99国产精品成人| 日本欧美肥老太交大片| 性做久久久久久| 视频在线观看国产精品| 亚洲午夜久久久久久久久久久| 成人欧美一区二区三区白人| 国产亚洲一二三区| 日本一区二区三区dvd视频在线| 日韩一区二区三区三四区视频在线观看 | 亚洲成人动漫在线免费观看| 亚洲乱码国产乱码精品精98午夜 | 国产曰批免费观看久久久| 久久99国产精品免费网站| 免费人成在线不卡| 国产不卡在线一区| 国产精品99精品久久免费| 国产一区二区三区最好精华液| 麻豆免费看一区二区三区| 久久精品国产亚洲高清剧情介绍| 日韩av中文在线观看| 日本欧美大码aⅴ在线播放| 日本不卡123| 精品一区二区在线免费观看| 久久丁香综合五月国产三级网站| 日本视频一区二区| 国产黄色成人av| 成人性色生活片免费看爆迷你毛片| 久久91精品国产91久久小草| 激情欧美日韩一区二区| 国产成人午夜99999| av午夜一区麻豆| 欧美在线你懂的| 日韩欧美精品在线视频| 国产日韩欧美a| 亚洲综合区在线| 捆绑紧缚一区二区三区视频| 韩国av一区二区三区在线观看| 国产成人精品亚洲午夜麻豆| 色哟哟一区二区在线观看| 欧美日韩亚洲另类| 精品精品欲导航| 综合分类小说区另类春色亚洲小说欧美| 一区二区三区国产精华| 免费在线观看一区| kk眼镜猥琐国模调教系列一区二区 | 亚洲线精品一区二区三区| 麻豆成人久久精品二区三区红 | 国产精品不卡视频| 天天色综合天天| 国产jizzjizz一区二区| 欧美日韩一区二区三区高清 | 久久99精品视频|