|
STR$()
Nov 5, 2023 18:56:42 GMT
Post by Splief on Nov 5, 2023 18:56:42 GMT
n=3 n$=str$(n)
works great, cept n$ is now 2 bytes in size because there's a leading blank space from Str$(). I didn't try this with more than single digits as I'm dealing with this problem now. But I assume the effect is the same. That's gotta be a bug, as the position of n within the string is as important as the value being correct.
|
|
|
STR$()
Nov 5, 2023 21:30:45 GMT
Post by bplus on Nov 5, 2023 21:30:45 GMT
Yeah that's been around since the beginning, if the number were negative single digit numbers would take 2 spaces.
So _Trim$(str$(number)) to get rid of that starting space for positive numbers.
PITA I know! Comes in handy for print a bunch of positive numbers in a row eg, Print a;b;c ' no seperators needed
|
|
|
STR$()
Nov 6, 2023 12:30:27 GMT
Post by Ultraman on Nov 6, 2023 12:30:27 GMT
TRIM$ trims both leading and trailing, which is probably slower than just using LTRIM$, which only does leading.
|
|