Shop OBEX P1 Docs P2 Docs Learn Events
Scribbler loops — Parallax Forums

Scribbler loops

J^3J^3 Posts: 121
edited 2009-05-31 20:54 in Robotics
Good Morning everyone,

Does anyone know if there is a way to access the counter for a loop using the scribbler IDE?· I have looked through the help file and haven't found anything.· I would like to use this value in a conditional block.· For example, if the loop is suppose to run 5 times, and I am in the 4th run, how would I check the counter to see if I am in the 4th run?

Thanks in advance.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There are 10 types of people that understand binary, those who do, and those who don't.

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-05-31 20:08
    No, there isn't any way to access the loop counter in the GUI. You can edit the resulting PBASIC code, though, to add your own conditionals based on the appropriate Counter_ variable. You can also use the flags to count in binary and base a conditional on them, but that gets awkard after more than a bit or two.

    -Phil
  • J^3J^3 Posts: 121
    edited 2009-05-31 20:54
    Thanks for the reply phil.

    I will give your suggestions a go.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There are 10 types of people that understand binary, those who do, and those who don't.
Sign In or Register to comment.