Shop OBEX P1 Docs P2 Docs Learn Events
Spin code help — Parallax Forums

Spin code help

SovrSovr Posts: 12
edited 2010-08-13 21:12 in Propeller 1
It has been a very long since I have been doing spin code but I have forgotten two things, one is if you have a piece of code like this:

Repeat
Sec := sec + 1
actions := c.functions(sec,20)
If action == 1
Outa[3] := 1

And on a different file

Pub functions(sec,sectim)
If sec== sectim
Action := 1

Would pin 3 be positive when variable sec is 20? Can all of the variables (ex sec) be on one page of code to on a different file? Thank you for your help!

Comments

  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-08-13 21:12
    Sovr wrote: »
    ... Can all of the variables (ex sec) be on one page of code to on a different file?...

    Hi Sovr,

    welcome back.
    I'm not sure what your above statement means. Would you mind saying it in a different way? By "a different file" are you talking about a different object? You can call up methods from different objects, but those objects have to be declared in the OBJ part of the spin program.

    Also, when you post code, place your code between code tags, like what you see below but be sure to remove all of the spaces I placed between the brackets.

    [ code ]

    [ / code ]
    That way
      the indentation of your code
       is preserved.
    
Sign In or Register to comment.