Announcement

Collapse
No announcement yet.

Function not exiting and returning to Main function

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

  • ESPsupport
    replied
    Yeah, sure, send it to mark at 4dsystems dot com dot au

    Leave a comment:


  • JacquesJJ
    replied
    Can I send the code in private to you?

    Leave a comment:


  • ESPsupport
    replied
    Unless you can give me some code that behaves that way I can't work out what is going on.

    As I said my code does return to main

    Leave a comment:


  • JacquesJJ
    replied
    That is exactly what I want but when mine hits Test1() it just stops at the end and not returning to Main func

    Leave a comment:


  • ESPsupport
    replied
    Can you show an example that actually displays the issue?

    Here's what I tried
    Code:
    #platform "uLCD-35DT"
    
    #inherit "4DGL_16bitColours.fnc"
    
    func main()
    
        print(1) ;
        Test1();
        print(2) ;
    
        Test2();
        print(3) ;
    
        repeat                      // maybe replace
        forever                     // this as well
    
    endfunc
    
    
    func Test1()
    //(Do something and return to main when done)
    endfunc
    
    func Test2()
    //(Do Something)
    endfunc
    And what was printed was "123"

    Leave a comment:


  • JacquesJJ
    started a topic Function not exiting and returning to Main function

    Function not exiting and returning to Main function

    Hello,

    Hope it goes well?

    I've created three types of functions and I am calling them in the Main function, only problem is when the second function code runs through
    it get's stuck at the end and not going back to the Main Function.
    For example:

    Func Main()
    test1();

    test2();
    endfunc


    func Test1()
    (Do something and return to main when done)
    endfunc

    func Test2()
    (Do Something)
    endfunc
Working...
X