diff --git a/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/coercing.kt b/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/coercing.kt index 99fa3eb30..384b89bfe 100644 --- a/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/coercing.kt +++ b/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/coercing.kt @@ -372,16 +372,6 @@ private fun computeHiValue(type: NumberType): Value { TODO("Type ${type.rpgType} with ${type.entireDigits} digit is not valid") } -private fun computeLowValue(type: StringType): Value = StringValue(lowValueString(type)) - -private fun computeHiValue(type: StringType): Value = StringValue(hiValueString(type)) - -// TODO -fun lowValueString(type: StringType) = " ".repeat(type.size) - -// TODO -fun hiValueString(type: StringType) = "\uFFFF".repeat(type.size) - private fun computeLowValue(type: NumberType): Value { // Packed and Zone if (type.rpgType == RpgType.PACKED.rpgType || type.rpgType == RpgType.ZONED.rpgType || type.rpgType.isNullOrBlank()) { @@ -413,4 +403,14 @@ private fun computeLowValue(type: NumberType): Value { return IntValue("-$ed".toLong()) } TODO("Type '${type.rpgType}' with ${type.entireDigits} digit is not valid") -} \ No newline at end of file +} + +private fun computeHiValue(type: StringType): Value = StringValue(hiValueString(type.size)) + +private fun computeLowValue(type: StringType): Value = StringValue(lowValueString(type.size)) + +// TODO +private fun hiValueString(size: Int) = "\uFFFF".repeat(size) + +// TODO +private fun lowValueString(size: Int) = " ".repeat(size) \ No newline at end of file