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

View File

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