Le 14 mai 2011 16:18, Alexander <[email protected]> a écrit :
> Hello,
Hi Alexander!
> I'm using liquidsoap, built from last svn trunk.
> I'm creating sources dynamically, some sources require to use jingles, and
> some sources should not have any jingles.
> Is is possible to use conditions in liq scripts? Unfortunately could not
> find anything with goodle :(
>
> In fact, i'm receiving data from cli script (password, playlist, jingles,
> etc.)
> i can call one more script from liquidsoap to fetch data about radio jingles
> usage and maybe use "switch" here to handle this data, but not sure that it
> is appropriate solution...
The is construct is as follows:
source =
if source_type == "jingles" then
(...)
else
(..)
end
You can also use elsif to combine several conditional statements.
On thing you should have in mind is that all if blocks are typed.
Therefore, you may have to provide a return statement for each part of
the conditional evaluation. For instance, in the above, both
conditions should return a source.
The only case where you may have an if without an else is when the if
block returns something of type unit.
Good luck with your script!
Romain
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users