The SORT function (which I’m embarrassed to say I didn’t think existed,
and I’ve been coding unibasic for the last 8 or 9 years!) sorts the data
passed into it; there isn’t a return value. So
does work. Your original program sets LIST to 0 because LIST is set to
the return result of the sort statement – perhaps this should throw a
compiler error? Or perhaps there’s an undocumented return code if the
data could not be sorted?