Using 'once' inside a for loop

Discussion in 'C-Touch/HomeGate/SchedulePlus/PICED Software' started by filpee, Oct 25, 2007.

  1. filpee

    filpee

    Joined:
    May 31, 2006
    Messages:
    204
    Likes Received:
    0
    Location:
    Western Australia
    Should the following bit of code work?

    Code:
    {--input buttons--}
    for i := minInputVal to maxInputVal do
      once (GetLightingState(i)=ON) then
      begin
        if(GetLightingState(i+offsetVal)=OFF) then
        begin
          ProcessInput(i,i+offsetVal);
        end;
      end;
    
    Or is there a limitation preventing me from using the 'once' keyword from within a loop?
     
    filpee, Oct 25, 2007
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.