Announcement

Collapse
No announcement yet.

Function not exiting and returning to Main function

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

  • 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

  • #2
    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"
    Mark

    Comment


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

      Comment


      • #4
        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
        Mark

        Comment


        • #5
          Can I send the code in private to you?

          Comment


          • #6
            Yeah, sure, send it to mark at 4dsystems dot com dot au
            Mark

            Comment

            Working...
            X