Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Systematic declaration of thread variables
#1
I understand that thread variables must be declared in each function where used. Supposed than one has an ample number of thread variables, which have to be declared explicitly in each one of a number of functions to be called. I wonder whether there exists a way to declare once in one specific function these variables and afterwards to "call" somehow this specific function in the functions which make use of these thread variables. Let me add that I am looking for something similar to common blocks in Fortran. I also understand that I can define a type variable and use it in functions. However, I am not sure whether this is the best way to do it. Any advice is mostly welcome.
#2
Quote:I wonder whether there exists a way to declare once in one specific function these variables and afterwards to "call" somehow this specific function in the functions which make use of these thread variables
Does not exist in QM.
Quote:I can define a type variable and use it in functions. However, I am not sure whether this is the best way to do it.
Yes, it is the best way. Or use a class, it is similar.
#3
Many thanks indeed ! Best regards.


Forum Jump:


Users browsing this thread: 1 Guest(s)