mirror of
https://github.com/boxgaming/qbjs.git
synced 2024-09-20 04:24:45 +00:00
Added support for base-2 numbers: enabled Val("&B"...)
This commit is contained in:
parent
49f1732075
commit
8afd7e4a72
2 changed files with 3 additions and 1 deletions
2
qb.js
2
qb.js
|
@ -1108,6 +1108,8 @@ var QB = new function() {
|
|||
ret = parseInt(value.slice(2), 16);
|
||||
} else if (value.substring(0, 2) == "&O") {
|
||||
ret = parseInt(value.slice(2), 8);
|
||||
} else if (value.substring(0, 2) == "&B") {
|
||||
ret = parseInt(value.slice(2), 2);
|
||||
} else {
|
||||
ret = Number(value);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue