| |

VerySource

 Forgot password?
 Register
Search
Author: 8919795

Is there a general way to change GOTO into a loop? What should I do?

[Copy link]

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-2 16:30:01
| Show all posts
No need to change
Reply

Use magic Report

0

Threads

12

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 Hong Kong

Post time: 2020-8-2 17:30:02
| Show all posts
Sometimes you don’t need to change it, but generally change to do...while
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-8-2 18:00:01
| Show all posts
while (true) {
switch(...){
  case .....:break;
  case .....:continue;
...
}
if(...)break;
....
}
Reply

Use magic Report

0

Threads

1

Posts

1.00

Credits

Newbie

Rank: 1

Credits
1.00

 China

Post time: 2020-8-13 09:52:12
| Show all posts
Depending on the program structure, some are changed to if else structure, some are changed to swict case structure, some are changed to loop, and some are changed to return
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list