(Mar-17-2021, 10:37 PM)deanhystad Wrote: There obviously is a problem with the calling code that appears when it is called from inside a function. Without seeing where the error is appearing it is difficult to see where the error occurred.
This code has no errors because it works when a == 1.
x = 5 / aNever mind that it fails when a == 0. That is a problem with a, not the code.
Not sure I follow you. I'm passing 4 variables outside or within a function. x (0 position) is not used.
x = sys.argv[0] a = sys.argv[1] b = sys.argv[2] c = sys.argv[3] d = sys.argv[4]