Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Macros Functions
#1
Hi Gintaras,

Macros are run immediately as a thread and functions are placed on a stack and code that is calling a function is only resumed after the function returns (correct?). That is why I have calls to a macro (and not a function) if I want say to produce a warning message (could take forever to be answered). It allows the primary code to continue with the necessary actions, while simultaneously warning the user.

I wondered whether this would be also possible using a function, or would that completely go against the whole concept of functions?
Anyway I experimented whether 'run in a separate process' would do that, but that doesn't change anything I am aware of.

Secondly, I have not been able to find an example (or equally possible: I do not understand the examples :-) of the use of a shared function. Could you please provide me with one?

Thank you !

Regards,
GertC
#2
For such asynchronous messages etc use function, not macro.

mac "Function123"

If it is a subfunction:

mac "sub.Function123"
...
#sub Function123
...


Quote:Secondly, I have not been able to find an example (or equally possible: I do not understand the examples :-) of the use of a shared function. Could you please provide me with one?
Do you mean "shared subfunction"?
#3
Works !

Yes it's about shared subfunction
#4
Function __sub_Math
Code:
Copy      Help
#sub Add
function# a b
ret a+b


#sub Mul
function# a b
ret a*b

Macro Macro471
Code:
Copy      Help
out sub_Math.Add(3 4)
out sub_Math.Mul(3 4)
#5
Works as well! Thank you now I can use it.


Forum Jump:


Users browsing this thread: 1 Guest(s)