Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // NO GOTO
- var compute_a = some_func_0();
- if (test_condition_a)
- {
- var compute_b = some_func_1();
- if (test_condition_b(compute_b))
- {
- var compute_c = some_func_2();
- if (test_condition_c(compute_c))
- {
- var compute_d = some_func_3();
- if (test_condition_d(compute_d))
- {
- // actual business logic here
- }
- }
- }
- }
- // GOTO
- var compute_a = some_func_0();
- if (!test_condition_a)
- goto SKIP;
- var compute_b = some_func_1();
- if (!test_condition_b)
- goto SKIP;
- var compute_c = some_func_2();
- if (!test_condition_c(compute_c))
- goto SKIP;
- var compute_d = some_func_3();
- if (!test_condition_d(compute_d))
- goto SKIP;
- // actual business logic here
- SKIP: ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement