SIOC Script modification
Posted: Sat May 14, 2016 1:20 pm
Hi all
I'm actually working on my OCP4NGX_PP_v4.0.ssi script, but have little experience. Now I have a basic question. Very often I find definitions like this:
//
Var 0431, name gear_0_l_l, Link IOCARD_OUT, Device 31, Output 12 // Nose Gear Green LED
Var 1339, name gear_0_l, static // Nose Gear Green state
{
CALL &nosegsub
}
Var 0432, name nosegsub, Link SUBRUTINE
{
IF &gear_0_l = 0
{
&gear_0_l_l = 0
}
ELSE
{
&gear_0_l_l = 1
}
}
//
But I have learned from the SIOC presentation (at least I think so), that variables may also appear on the right side of the = sign. So I think the following much shorter script should do the same job:
//
Var 0431, name gear_0_l_l, Link IOCARD_OUT, Device 31, Output 12 // Nose Gear Green LED
Var 1339, name gear_0_l, static // Nose Gear Green state
{
&gear_0_l_l = &gear_0_l
}
//
Is this correct or bloody nonsense? Thanks for infos.
Urs
I'm actually working on my OCP4NGX_PP_v4.0.ssi script, but have little experience. Now I have a basic question. Very often I find definitions like this:
//
Var 0431, name gear_0_l_l, Link IOCARD_OUT, Device 31, Output 12 // Nose Gear Green LED
Var 1339, name gear_0_l, static // Nose Gear Green state
{
CALL &nosegsub
}
Var 0432, name nosegsub, Link SUBRUTINE
{
IF &gear_0_l = 0
{
&gear_0_l_l = 0
}
ELSE
{
&gear_0_l_l = 1
}
}
//
But I have learned from the SIOC presentation (at least I think so), that variables may also appear on the right side of the = sign. So I think the following much shorter script should do the same job:
//
Var 0431, name gear_0_l_l, Link IOCARD_OUT, Device 31, Output 12 // Nose Gear Green LED
Var 1339, name gear_0_l, static // Nose Gear Green state
{
&gear_0_l_l = &gear_0_l
}
//
Is this correct or bloody nonsense? Thanks for infos.
Urs