Remove extra parentheses per abaplint (#329)

This commit is contained in:
András B Nagy
2025-06-30 22:38:30 -07:00
committed by GitHub
parent 8ceeb7ebf6
commit 46029efb69
2 changed files with 6 additions and 6 deletions

View File

@@ -27,7 +27,7 @@ CLASS zcl_crypto_square IMPLEMENTATION.
IF str_len = 0.
RETURN.
ENDIF.
WHILE ( column * row ) < str_len.
WHILE column * row < str_len.
IF column > row.
row += 1.
ELSE.
@@ -41,7 +41,7 @@ CLASS zcl_crypto_square IMPLEMENTATION.
FOR j = 0 UNTIL j = row
NEXT txt &&= |{
"check offset beyond string length?
COND string( WHEN ( ( j * column ) + i ) >= str_len
COND string( WHEN j * column + i >= str_len
"add space if , more than one row in square
THEN COND string( WHEN row > 1
THEN ` `

View File

@@ -18,11 +18,11 @@ ENDCLASS.
CLASS zcl_darts IMPLEMENTATION.
METHOD score.
IF ( ( x * x ) + ( y * y ) ) <= 1.
IF x * x + y * y <= 1.
result = 10.
ELSEIF ( ( x * x ) + ( y * y ) ) <= ( 5 * 5 ).
ELSEIF x * x + y * y <= ( 5 * 5 ).
result = 5.
ELSEIF ( ( x * x ) + ( y * y ) ) <= ( 10 * 10 ).
ELSEIF x * x + y * y <= ( 10 * 10 ).
result = 1.
ENDIF.
ENDMETHOD.