0

In the sentence below, I'd like to see if "were executed" is correct in the context and if it sounds acceptable to the native ear.

What would the output be, e.g. on the computer screen, if the code fragment below were executed?

 a=5 
 b=2 
 c=a+b 
 print c

The reason I'm asking is that it didn't sound as good as

What would the output be, e.g. on the computer screen, if the code fragment below were to be executed?

  • Side note- not sure you’re using “e.g.” correctly, which means “for example”. Could the output appear somewhere else besides the computer screen? I think you vould omit the “e.g.” and it would sound better. Maybe you’re confusing it with “i.e.”, which basically means “in other words”. – Mixolydian Mar 21 at 10:41
  • The output could possibly appear on paper by a printer. – learner Mar 22 at 17:35
  • Ok sure, then never mind, "e.g." is perfectly fine here. – Mixolydian Mar 22 at 17:45
2

Either of these options is acceptable; "were to be executed" sounds a little old fashioned and formal in the kind of brief question you are asking. I suggest using "were executed"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.