GPUTCHR 0,0," "*(8-LEN(NAME$[I]))+NAME$[I]+" : "+STR$(HIGHSCORE[I]) 'can be... GPUTCHR 0,0,FORMAT$("%8S : %D",NAME$[I],HIGHSCORE[I])FORMAT$ can accept an unlimited* number of values (even 0!). string$ = FORMAT$( formatString$, values ... ) formatString$ is a string containing normal text and formatting codes. Formatting codes start with % and end with a letter that controls the type. They can also have optional flags between the % and the letter. "%" can be inserted into the output by escaping it: %%
Root / Submissions / [.]
The FORMAT$() function converts a format string and a list of values into a single string. (Nearly identical to sprintf() in C, but with some of the formatting codes blocked) Rather than using multiple STR$, HEX$, or BIN$ functions, and combining strings, you can use FORMAT$ to make your code neater. For example, if you're displaying a list of names and highscores, and you want the rows to line up:
This is very useful! I didn't even know it was this cool. Thanks!