Jump to content

Recommended Posts

Posted

Hi,

I was just wondering is there any way to separate my code like an "if else" statement in C.

For example. If a condition is met, I would like to run only a selection of 10 lines of code and if the same condition is not met, I want to run a different 10 lines of code.

Thanks in advance!

Posted
Just now, Flex727 said:

Sure, place your conditional code in separate subroutines and call the appropriate one based on which condition is met.

Thank you very much sir! Will try that.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.