Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2927
Posted: 09:29am 22 Jul 2014
Copy link to clipboard
Print this post
Assuming value is in a string called Tdata$, then one way to strip a potential leading space is with:
IF LEFT$(Tdata$,1,1)=" " THEN
Tdata$=RIGHT$(Tdata$,2,(LEN(Tdata$)-1))
ENDIF
Another way is to convert string to value with the VAL command. I don't remember MMBasic having a TRIM command (or LTRIM), and don't currently have access to a user manual to check.
Not sure if FORMAT command has a syntax that may work too.
Above should give you something to go on . . . .
WW
edu001 Regular Member Joined: 14/07/2014 Location: United KingdomPosts: 82
Posted: 11:53pm 22 Jul 2014
Copy link to clipboard
Print this post
Thanks I will try the suggested solutions later I will also post the code
edu001 Regular Member Joined: 14/07/2014 Location: United KingdomPosts: 82