@abaplint/runtime 2.1.81 → 2.1.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Float, Hex, Integer } from "../types";
|
|
2
2
|
import { ICharacter } from "../types/_character";
|
|
3
3
|
import { INumeric } from "../types/_numeric";
|
|
4
|
-
export declare function add(left: INumeric | ICharacter | string | number | Float | Integer | Hex, right: INumeric | ICharacter | string | number | Float | Integer | Hex):
|
|
4
|
+
export declare function add(left: INumeric | ICharacter | string | number | Float | Integer | Hex, right: INumeric | ICharacter | string | number | Float | Integer | Hex): Integer | Float;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Float, Integer } from "../types";
|
|
2
2
|
import { ICharacter } from "../types/_character";
|
|
3
3
|
import { INumeric } from "../types/_numeric";
|
|
4
|
-
export declare function minus(left: INumeric | ICharacter | string | number | Integer | Float, right: INumeric | ICharacter | string | number | Integer | Float):
|
|
4
|
+
export declare function minus(left: INumeric | ICharacter | string | number | Integer | Float, right: INumeric | ICharacter | string | number | Integer | Float): Integer | Float;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Float, Integer } from "../types";
|
|
2
2
|
import { ICharacter } from "../types/_character";
|
|
3
3
|
import { INumeric } from "../types/_numeric";
|
|
4
|
-
export declare function multiply(left: INumeric | ICharacter | string | number, right: INumeric | ICharacter | string | number):
|
|
4
|
+
export declare function multiply(left: INumeric | ICharacter | string | number, right: INumeric | ICharacter | string | number): Integer | Float;
|
package/build/src/types/hex.js
CHANGED
|
@@ -8,7 +8,7 @@ export declare class XString implements ICharacter {
|
|
|
8
8
|
qualifiedName?: string;
|
|
9
9
|
});
|
|
10
10
|
getQualifiedName(): string | undefined;
|
|
11
|
-
set(value: ICharacter | INumeric | string): void;
|
|
11
|
+
set(value: ICharacter | INumeric | string | number): void;
|
|
12
12
|
clear(): void;
|
|
13
13
|
get(): string;
|
|
14
14
|
getOffset(input: {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.XString = void 0;
|
|
4
4
|
const _parse_1 = require("../operators/_parse");
|
|
5
|
+
const float_1 = require("./float");
|
|
5
6
|
class XString {
|
|
6
7
|
constructor(input) {
|
|
7
8
|
this.value = "";
|
|
@@ -16,9 +17,19 @@ class XString {
|
|
|
16
17
|
const finalLength = Math.ceil(this.value.length / 2) * 2;
|
|
17
18
|
this.value = this.value.padEnd(finalLength, "0");
|
|
18
19
|
}
|
|
20
|
+
else if (typeof value === "number") {
|
|
21
|
+
this.value = Math.round(value).toString(16);
|
|
22
|
+
if (this.value.length % 2 === 1) {
|
|
23
|
+
this.value = "0" + this.value;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
19
26
|
else {
|
|
20
|
-
|
|
21
|
-
if (
|
|
27
|
+
let v = value.get();
|
|
28
|
+
if (value instanceof float_1.Float) {
|
|
29
|
+
v = value.getRaw();
|
|
30
|
+
this.set(v);
|
|
31
|
+
}
|
|
32
|
+
else if (typeof v === "number") {
|
|
22
33
|
this.value = v.toString(16);
|
|
23
34
|
const finalLength = Math.ceil(this.value.length / 2) * 2;
|
|
24
35
|
this.value = this.value.padStart(finalLength, "0");
|