Learning Structure Based Programing

Hi,

Being a self-taught Igor programmer (no one else to blame), I would like to continue to upgrade my skills. Is there a good tutorial source to teach myself structure based programming? I appreciate not just examples but also a bit of high level framework discussions of what is the goal of the technique and the pros and cons.

Thanks In Advance.
I approached this from two ends. First, I started with the control panels and the structures contained therein. Build a simple panel and add various controls, each time setting up a default procedure for it. Try playing around with the control structure parameters within the control procedure to see what they do. Secondly, I reviewed some of the examples in the manual and then tried modifying them to suit my needs.

You can always to a print of a structure at any point to see its contents, and following the progress of a procedure using the debugger helps too.

As for pros/cons, one advantage of structures is that they can be stored and retrieved as "preference" sets. Another is, they can be tools to generate initialization sets ...

STRUCTURE MyPanel
    variable width
    variable height
ENDSTRUCTURE

Function InitializeSmallPanel(MP)
    STRUCT MyPanel &MP

    MP.width = 120
    MP.height = 100
    return 0
end

Function InitializeLargePanel(MP)
    STRUCT MyPanel &MP

    MP.width = 180
    MP.height = 120
    return 0
end

Function ChoseIt(LargeOrSmall)
    variable LargeOrSmall

    STRUCT MyPanel MP
    if (LargeOrSmall=1)
         InitializeLargePanel(MP)
    else
         InitializeSmallPanel(MP)
    endif

    NewPanel/W={10,10,10+MP.width,10+MP.height}
    return 0
end


--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville