LTRIM $

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
knothead1008
Coder
Posts: 10
Joined: Mon Feb 04, 2019 1:22 am

LTRIM $

Post by knothead1008 »

I was wondering if there is away to do an LTRIM$ globally thru the script to handle something like,

PRINT LTRIM$ TP: "TOTAL PARTS";

Brian..
MikeHawk
Veteran
Posts: 61
Joined: Sun Jul 08, 2018 11:23 am

Re: LTRIM $

Post by MikeHawk »

I'm not sure I get it. Are you trying to do this?

Code: Select all

PRINT LTRIM$(STR$(TP)) + "TOTAL PARTS";
You have to convert numbers to strings before you can use LTRIM$() on them. You could also try PRINT USING.
knothead1008
Coder
Posts: 10
Joined: Mon Feb 04, 2019 1:22 am

Re: LTRIM $

Post by knothead1008 »

Got it. .
Thanks for replying
Post Reply