The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get a return value from "mac(function)" ?
#1
What i need is to run a function by variable and get its TRUE/FALSE return value.

The only way i could find that would run a function dynamically was mac(function), but it appears to return true if it was found/executed, rather than returning the return values of the function itself.

I can do it with the new thread setting a global variable like this:

Caller
Code:
Copy      Help
function str'name

name = "function1" ;; temp

int+ async_result;
async_result=0;

int hThread=mac(name)
wait 0 H hThread

if(async_result) out "True"
else out "False"

Function1
Code:
Copy      Help
function#
;;checks something, returns true
int+ async_result = 1;
Is there a better way i can do this?


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)