21st Mar 2023, 3:42 PM
Iamthekingherevaruna
Iamthekingherevaruna - avatar
8 Respostas
+ 3
Most of the warnings you see upon running the code was triggered due to the use of assignment operator `=` where there should be equality comparison operator `==` Somewhere in the long list of warnings, it also said there was either a missing or misplaced bracket. It was not really clear where, because it was in the line 75, where you crammed all the if...else if blocks. I suggest to rewrite line 75 by breaking it into several lines, in a hope the missing/misplaced bracket can be easier to locate, as code readability improves.. (Edit) OP had edited attached code.
21st Mar 2023, 4:45 PM
Ipang
+ 5
Now the code seems to work, some important hints: 1. Every time you start coding, spend more time thinking over logic than writing. How can you match each letter to its Morse code without such long stream of if's? 2. Get used to descriptive variable and function names. As code goes bigger and more complex, this visual aid does help.
22nd Mar 2023, 12:28 AM
Emerson Prado
Emerson Prado - avatar
+ 2
Thanks bro ... that was helpful
21st Mar 2023, 4:53 PM
Iamthekingherevaruna
Iamthekingherevaruna - avatar
+ 2
Iamthekingherevaruna OP = Original Poster One who wrote and submitted the post ...
22nd Mar 2023, 8:15 AM
Ipang
+ 1
Ipang what is OP ?
22nd Mar 2023, 7:57 AM
Iamthekingherevaruna
Iamthekingherevaruna - avatar
+ 1
Emerson Prado I'll keep it in mind... Thank you for this advice.⚘
22nd Mar 2023, 7:59 AM
Iamthekingherevaruna
Iamthekingherevaruna - avatar
+ 1
Ipang I see now Thx
22nd Mar 2023, 8:30 AM
Iamthekingherevaruna
Iamthekingherevaruna - avatar
0
Any solutions?
21st Mar 2023, 3:46 PM
Iamthekingherevaruna
Iamthekingherevaruna - avatar