Hello!
If you write non-trivial scripts (i.e. something more than single expression like $1/1024) you should define main() function. So you script should looks like this:
sub main()
{
if ($1>5) return min($2, $3);
}
btw, you should return something also in case when $1>5 is false, so final form will be
sub main()
{
if ($1>5)
return min($2, $3);
return 0; // Or any other default value
}
Best regars,
Victor
If you write non-trivial scripts (i.e. something more than single expression like $1/1024) you should define main() function. So you script should looks like this:
sub main()
{
if ($1>5) return min($2, $3);
}
btw, you should return something also in case when $1>5 is false, so final form will be
sub main()
{
if ($1>5)
return min($2, $3);
return 0; // Or any other default value
}
Best regars,
Victor
