Announcement

Collapse
No announcement yet.

call() multiple return values

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • call() multiple return values

    Is there an issue with multiple return values when using call()? This statement returns nothing.

    debugPrintln(call("Builtin/builtinStoch.efs"));

    I am successfully using call() with single return values. When calling efs that return arrays, I am running up against problems. Trying to figure out if I am using the function incorrectly or it is a limitation of call().

    Thanks.

  • #2
    Gavishti
    Try doing a debug using the enclosed script. It seems to be working
    Alex

    PHP Code:
    function preMain() {
        
    setPriceStudy(false);
        
    setStudyTitle("Call-CallFunction test");
        
    setDefaultBarFgColor(Color.blue,0);
        
    setDefaultBarFgColor(Color.red,1);
        
    setColorPriceBars(true);
        
    setDefaultPriceBarColor(Color.black);
    }

    function 
    main() {
        
        var 
    test null;
         
        
    test call("/Builtin/builtinStoch.efs");
        
        if (
    test == null
        return;
            
        var 
    test1 test[0];
        var 
    test2 test[1];
        
        
    debugPrintln(call("/Builtin/builtinStoch.efs")+"  "+test[0]+"  "+test[1]);
        
        return new Array(
    test1,test2);

    Comment


    • #3
      Thanks Alexis. The part I was missing was if (test == null) return; That cured up all the problems and it worked great.

      Comment

      Working...
      X