There is no numeric list sort in GPM templates. However, you can get the same effect by formatting the numbers with leading zeros, as in
Code:
program:
ids = book_values('id', 'series:true', ',', 0);
new_ids = '';
for id in ids:
new_ids = new_ids & format_number(id, '04d') & ','
rof;
list_sort(new_ids, 0, ',')
However, I suspect you are sorting to find the minimum. If so then instead of rebuilding and sorting the list you could do
Code:
program:
ids = book_values('id', 'series:true', ',', 0);
minimum = 9999999999;
for id in ids:
if id <# minimum then
minimum = id
fi
rof;
minimum