Results 1 to 3 of 3
  1. #1
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    Aug 2008
    Location
    Taiwan
    Posts
    6
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    SIOC MOD function, please.

    Dear all,

    Thanks to lekseecon’s script as under.

    Regarding to MOD &BlinkLed 2 of script as under, would you please help me to explain why 10 MOD 2 = 0, 9 MOD 2 =1, 8 MOD 2 = 0 and so on. I still can not figure it out. Thanks.
    Var 0
    {
    &Led = 0
    }

    Var 1 name Button Link IOCARD_SW Input 27 Type I
    {
    IF &Button = 1
    {
    IF &Led = 0 // only start if led does not blink
    {
    &BlinkLed = 10 // begin value of timer
    &BlinkLed = TIMER 0 -1 40
    }
    }
    }

    Var 2 name BlinkLed
    {
    L0 =
    MOD &BlinkLed 2
    IF L0 = 0
    {
    &Led = 0
    }
    ELSE
    {
    &Led = 1
    }
    }

    Var 10 name Led Link IOCARD_OUT Output 92

  2. #2
    2000+ Poster - Never Leaves the Sim kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    2,202
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: SIOC MOD function, please.

    Hi,
    MOD is a SIOC function. It's an abbreviation of Modulo. Modulo is an arithmetic operation. Please Google for modulo and you will find out.
    Nico

  3. #3
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    Aug 2008
    Location
    Taiwan
    Posts
    6
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: SIOC MOD function, please.

    Quote Originally Posted by kiek View Post
    Hi,
    MOD is a SIOC function. It's an abbreviation of Modulo. Modulo is an arithmetic operation. Please Google for modulo and you will find out.
    Nico
    Hi,

    Noted & thanks.

    David