31
GLBasic - en / Suggestion - RIGHT$ (and LEFT$)
« on: 2008-Jan-14 »
to join MID$ - these commands take the rightmost (or leftmost) characters from a string - very useful for leading zeroes - for example
PRINT "Score: "+RIGHT$("000000"+score,6)
would take the last 6 characters of the string, giving:
Score: 000007
Score: 000042
Score: 012345
PRINT "Score: "+RIGHT$("000000"+score,6)
would take the last 6 characters of the string, giving:
Score: 000007
Score: 000042
Score: 012345

