Quote:
Originally Posted by ownedbycats
Okay, here's something semi-related to the last one:
Code:
program:
if $#fanficcat && '/' in $#chapters then
f = re($#chapters, '(.*)/.*', '\1');
s = re($#chapters, '.*/(.*)', '\1');
if s - f >=# 1 then s - f fi
fi
Is there a less kludgey way to handle line 5 so that '0' returns an empty value (e.g. if fanfic_unreadchaps() then 'output' type things)
|
What I would do is:
Code:
program:
res = '';
if $#fanficcat && '/' in $#chapters then
f = re($#chapters, '(.*)/.*', '\1');
s = re($#chapters, '.*/(.*)', '\1');
if s > f then
res = s - f
fi
fi
You can get rid of 'res' if the result of the template is the value of the if