View Single Post
Old 01-06-2016, 05:14 AM   #14
Morrigu
Junior Member
Morrigu began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2016
Device: Kindle Paper White
Quote:
Originally Posted by chaley View Post
Because period comes before right bracket in the standard character sort order. You can see the sort order here.

Try putting a space before the closing bracket. The space character sorts before the period. For consistency you might put a space after the opening bracket.
Hello,

Sorry to be dense, I know nothing of programming. I was interested in doing the same thing that the OP but can't figure out where exactly to add the spaces. I've copied the following code into the editor and have tried spaces in different spots but to no avail. (I did break it a couple of times though

To add a space would it also be ' ' ? I didn't want the [ ] that the OP used and wanted a # and I figured out how to do that. Just stuck on this bit.

Thanks for any help!

Code that I inserted:

program:

sidx=field('series_index');
i=format_number(sidx, "{:02d}");
f=format_number(sidx, "{:04.1f}");
isInt=cmp(f, i, '', 'yes', '');
final_sidx=finish_formatting(
test(isInt, i, f),
'',
' #',
' '
);

# Add together the final result
strcat(
field('series'),
final_sidx,
field('title')
);
Morrigu is offline   Reply With Quote