Skip to content

Commit 46029ef

Browse files
authored
Remove extra parentheses per abaplint (#329)
1 parent 8ceeb7e commit 46029ef

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

exercises/practice/crypto-square/.meta/zcl_crypto_square.clas.abap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ CLASS zcl_crypto_square IMPLEMENTATION.
2727
IF str_len = 0.
2828
RETURN.
2929
ENDIF.
30-
WHILE ( column * row ) < str_len.
30+
WHILE column * row < str_len.
3131
IF column > row.
3232
row += 1.
3333
ELSE.
@@ -41,7 +41,7 @@ CLASS zcl_crypto_square IMPLEMENTATION.
4141
FOR j = 0 UNTIL j = row
4242
NEXT txt &&= |{
4343
"check offset beyond string length?
44-
COND string( WHEN ( ( j * column ) + i ) >= str_len
44+
COND string( WHEN j * column + i >= str_len
4545
"add space if , more than one row in square
4646
THEN COND string( WHEN row > 1
4747
THEN ` `

exercises/practice/darts/.meta/zcl_darts.clas.abap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ ENDCLASS.
1818

1919
CLASS zcl_darts IMPLEMENTATION.
2020
METHOD score.
21-
IF ( ( x * x ) + ( y * y ) ) <= 1.
21+
IF x * x + y * y <= 1.
2222
result = 10.
23-
ELSEIF ( ( x * x ) + ( y * y ) ) <= ( 5 * 5 ).
23+
ELSEIF x * x + y * y <= ( 5 * 5 ).
2424
result = 5.
25-
ELSEIF ( ( x * x ) + ( y * y ) ) <= ( 10 * 10 ).
25+
ELSEIF x * x + y * y <= ( 10 * 10 ).
2626
result = 1.
2727
ENDIF.
2828
ENDMETHOD.
2929

3030

31-
ENDCLASS.
31+
ENDCLASS.

0 commit comments

Comments
 (0)