Skip to main content
added 18 characters in body
Source Link
ocrdu
  • 1.8k
  • 3
  • 12
  • 24

using Using different variables in a function

I have a function SetTFgr (float T, int FGr)SetTFgr(float T, int FGr) to set the time and filtergrade of my LED enlarger. It

It works without a problem and changes the values of TT or FgrFgr according to the buttons I press. Both TT and FGrFGr are global veriablesvariables.

Now I want to use the same funtion with different variables. When I call the function with SetTFgr(TExp[i], FGrExp[i])SetTFgr(TExp[i], FGrExp[i]) I would expect the function to work with the values of TExp[i]TExp[i] or FGrExp[i]FGrExp[i] and increase/decrease these values. It does not, it appears to use the value of TT or Fgr in steadFgr instead.

How can I get what I am after?

using different variables in a function

I have a function SetTFgr (float T, int FGr) to set the time and filtergrade of my LED enlarger. It works without a problem and changes the values of T or Fgr according to the buttons I press. Both T and FGr are global veriables.

Now I want to use the same funtion with different variables. When I call the function with SetTFgr(TExp[i], FGrExp[i]) I would expect the function to work with the values of TExp[i] or FGrExp[i] and increase/decrease these values. It does not, it appears to use the value of T or Fgr in stead.

How can I get what I am after?

Using different variables in a function

I have a function SetTFgr(float T, int FGr) to set the time and filtergrade of my LED enlarger.

It works without a problem and changes the values of T or Fgr according to the buttons I press. Both T and FGr are global variables.

Now I want to use the same funtion with different variables. When I call the function with SetTFgr(TExp[i], FGrExp[i]) I would expect the function to work with the values of TExp[i] or FGrExp[i] and increase/decrease these values. It does not, it appears to use the value of T or Fgr instead.

How can I get what I am after?

Bumped by Community user
Bumped by Community user
Bumped by Community user
Source Link

using different variables in a function

I have a function SetTFgr (float T, int FGr) to set the time and filtergrade of my LED enlarger. It works without a problem and changes the values of T or Fgr according to the buttons I press. Both T and FGr are global veriables.

Now I want to use the same funtion with different variables. When I call the function with SetTFgr(TExp[i], FGrExp[i]) I would expect the function to work with the values of TExp[i] or FGrExp[i] and increase/decrease these values. It does not, it appears to use the value of T or Fgr in stead.

How can I get what I am after?