Remove extra parentheses per abaplint (#329)
This commit is contained in:
@@ -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 ` `
|
||||
|
||||
@@ -18,14 +18,14 @@ 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.
|
||||
|
||||
|
||||
ENDCLASS.
|
||||
ENDCLASS.
|
||||
|
||||
Reference in New Issue
Block a user