Timer 0 in DS_int_14 having a problem


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Wink Re: Timer 0 in DS_int_14 having a problem

    thanks Hendrick , i did not follow what he ment by the comment

    I eventually found that code
    Code:
     if (T0Count = Smoothfade) and Fade_flag = 2 then Smooth_reset
    was not returning , thought it was acted upon the same as

    Code:
     if (T0Count = Smoothfade) and Fade_flag = 2 then gosub Smooth_reset
    but it is not , as you say , the first is a goto and 2nd statement with the " gosub" returns and works fine


    Well something i did not know, i know now


    More fun learning ahead

    Cheers

    sheldon

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: Timer 0 in DS_int_14 having a problem

    Yeah, a subroutine must always end with a RETURN and must always be jumped to with a GOSUB.
    If you GOTO a subroutine it will fail badly once it hits the RETURN statement because it will then "return" to the wrong place because the correct place hasn't been stored.

    * Never GOSUB anything not ending with RETURN.
    * Never GOTO anything which does end with RETURN.

    The manual is pretty clear on that specifying a label in an IF statement causes a GOTO when the expression is evaluated true.

    I'm glad you're moving forward!
    /Henrik.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts