Mon 21 Jul 22:43:21 CEST 2025

This commit is contained in:
sbosse 2025-07-21 22:47:14 +02:00
parent c7cc5f7cc0
commit 5d13091cd9

31
js/dos/afvm_dictionary.js Normal file
View File

@ -0,0 +1,31 @@
/**
* Created by sbosse on 3/8/15.
*/
var Types = require('./afvm_types');
var assert = function(condition, message) {
if (!condition)
throw Error("[afvm_dictionary]" + (typeof message !== "undefined" ? ": " + message : ""));
};
var Dictionary = function () {
this.DICT = [];
};
Dictionary.prototype.Lookup = function (name) {
var _dict_off,_dict,_dict_entry,_dict_size;
_dict_off = -1;
_dict = this.DICT;
_dict_size = _dict.length;
for (i=0;i<_dict_size && _dict_off==-1;i++) {
_dict_entry = _dict[i];
if (_dict_entry.dict_name == name)
_dict_off = _dict_entry.dict_coff
}
return _dict_off;
};
module.exports = {
Dictionary: Dictionary
};