0

How would you run a Swift 3 file from another?

For example:

if executeFile1 = true{
//Run a program
}

else{
//Run another program
}

I know I could use functions, but this would help clean up my code and make it easier for me to edit in the future.

NOTE:

This is just a snippet of the code. The true/false does vary.

CheezBiscuit
  • 50
  • 1
  • 9
  • Your if statement is always true, ya its kind of humor! anyway, could you be more specific? try to describe it more... – Ahmad F Nov 01 '16 at 08:57
  • @AhmadF How could I change it to be able to be answered easily? Also, I added a note. Thanks for the heads up. – CheezBiscuit Nov 01 '16 at 09:12
  • What I meant is it is kind of vague; By default, if you have 2 `.swift` files, they can access each other (default access modifier is internal, for more information check [this answer](http://stackoverflow.com/questions/24003918/does-swift-have-access-modifiers/39697920#39697920)). Is that what are you asking about? – Ahmad F Nov 01 '16 at 09:43

0 Answers0