@abaplint/runtime 2.5.25 → 2.5.27
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.
|
@@ -16,7 +16,14 @@ async function cast(target, source) {
|
|
|
16
16
|
}
|
|
17
17
|
// eslint-disable-next-line prefer-const
|
|
18
18
|
let checkIntf = true;
|
|
19
|
-
if (
|
|
19
|
+
if (source instanceof types_1.FieldSymbol) {
|
|
20
|
+
if (source.getPointer() === undefined) {
|
|
21
|
+
throw new Error("GETWA_NOT_ASSIGNED");
|
|
22
|
+
}
|
|
23
|
+
await cast(target, source.getPointer());
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
else if (target instanceof types_1.FieldSymbol && target.getPointer() === undefined) {
|
|
20
27
|
throw new Error("GETWA_NOT_ASSIGNED");
|
|
21
28
|
}
|
|
22
29
|
let targetName = undefined;
|
|
@@ -57,7 +57,12 @@ function shift_character_mode(target, options) {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
else if (options === null || options === void 0 ? void 0 : options.circular) {
|
|
60
|
-
|
|
60
|
+
if (options.direction === "RIGHT") {
|
|
61
|
+
value = value.substring(value.length - 1, value.length) + value.substring(0, value.length - 1);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
value = value.substr(1) + value.substr(0, 1);
|
|
65
|
+
}
|
|
61
66
|
}
|
|
62
67
|
else {
|
|
63
68
|
value = value.substr(1);
|
|
@@ -6,6 +6,7 @@ const throw_error_1 = require("../throw_error");
|
|
|
6
6
|
const character_1 = require("./character");
|
|
7
7
|
const field_symbol_1 = require("./field_symbol");
|
|
8
8
|
const integer_1 = require("./integer");
|
|
9
|
+
const packed_1 = require("./packed");
|
|
9
10
|
const structure_1 = require("./structure");
|
|
10
11
|
class String {
|
|
11
12
|
constructor(input) {
|
|
@@ -35,9 +36,15 @@ class String {
|
|
|
35
36
|
else if (value instanceof structure_1.Structure) {
|
|
36
37
|
this.value = value.getCharacter();
|
|
37
38
|
}
|
|
39
|
+
else if (value instanceof packed_1.Packed) {
|
|
40
|
+
const lv_sign = value.get() >= 0 ? " " : "-";
|
|
41
|
+
this.value = Math.abs(value.get()).toFixed(value.getDecimals());
|
|
42
|
+
this.value += lv_sign;
|
|
43
|
+
}
|
|
38
44
|
else if (value instanceof integer_1.Integer) {
|
|
39
|
-
const lv_sign =
|
|
40
|
-
this.value = Math.abs(
|
|
45
|
+
const lv_sign = value.get() >= 0 ? " " : "-";
|
|
46
|
+
this.value = Math.abs(value.get()) + "";
|
|
47
|
+
this.value += lv_sign;
|
|
41
48
|
}
|
|
42
49
|
else {
|
|
43
50
|
this.value = value.get() + "";
|