Discussion:
Formatted PRINT in PowerBASIC
(too old to reply)
Antti J Ylikoski
2012-03-15 17:34:55 UTC
Permalink
What is the way to achieve formatted printing analogous to

PRINT USING P1$; N1, N2, N3

in the PowerBASIC?

I'm asking this here because the question may be of importance to many
individuals who wish to convert legacy code to the PowerBASIC compilers.
(For which purpose it is eminently suitable.) How about adding a
PRINT USING capability to the PowerBASIC for backward compatibility with
older BASICs?

yours, Antti "Andy" Ylikoski
Helsinki, Finland, the EU
Auric__
2012-03-15 23:01:45 UTC
Permalink
Post by Antti J Ylikoski
What is the way to achieve formatted printing analogous to
PRINT USING P1$; N1, N2, N3
in the PowerBASIC?
I'm asking this here because the question may be of importance to many
individuals who wish to convert legacy code to the PowerBASIC compilers.
(For which purpose it is eminently suitable.) How about adding a
PRINT USING capability to the PowerBASIC for backward compatibility with
older BASICs?
It depends on which version of PowerBASIC you're using, and what you're
trying to accomplish.

Both PB/DOS and PB/CC have PRINT USING (look for USING in the help file); all
versions have USING$ (which is different from USING; again, look for USING$
in the help file).

If you're specifically looking for console output, you need PB/CC.
--
I survived the Phoenix sun. It's a dry heat. Yeah, sure!
Antti J Ylikoski
2012-03-16 12:05:03 UTC
Permalink
Post by Auric__
Post by Antti J Ylikoski
What is the way to achieve formatted printing analogous to
PRINT USING P1$; N1, N2, N3
in the PowerBASIC?
I'm asking this here because the question may be of importance to many
individuals who wish to convert legacy code to the PowerBASIC compilers.
(For which purpose it is eminently suitable.) How about adding a
PRINT USING capability to the PowerBASIC for backward compatibility with
older BASICs?
It depends on which version of PowerBASIC you're using, and what you're
trying to accomplish.
Both PB/DOS and PB/CC have PRINT USING (look for USING in the help file); all
versions have USING$ (which is different from USING; again, look for USING$
in the help file).
If you're specifically looking for console output, you need PB/CC.
I found the USING$ function and got my job done, thanks. I'm using the
PBCC.

What would be the handiest way to simulate the TAB(N) function? I found
the TAB$() function but it is not immediately self-evident how to
simulate TAB() in a complex formatting program with the TAB$() function.
I can do so, but is there any easier and more direct way? Therefore,
how about adding the original BASIC TAB(N) to the PowerBASIC?

Andy
Auric__
2012-03-16 15:48:00 UTC
Permalink
Post by Antti J Ylikoski
Post by Auric__
Post by Antti J Ylikoski
What is the way to achieve formatted printing analogous to
PRINT USING P1$; N1, N2, N3
in the PowerBASIC?
I'm asking this here because the question may be of importance to many
individuals who wish to convert legacy code to the PowerBASIC compilers.
(For which purpose it is eminently suitable.) How about adding a
PRINT USING capability to the PowerBASIC for backward compatibility
with older BASICs?
It depends on which version of PowerBASIC you're using, and what you're
trying to accomplish.
Both PB/DOS and PB/CC have PRINT USING (look for USING in the help
file); all versions have USING$ (which is different from USING; again,
look for USING$ in the help file).
If you're specifically looking for console output, you need PB/CC.
I found the USING$ function and got my job done, thanks. I'm using the
PBCC.
What would be the handiest way to simulate the TAB(N) function? I found
the TAB$() function but it is not immediately self-evident how to
simulate TAB() in a complex formatting program with the TAB$() function.
I can do so, but is there any easier and more direct way? Therefore,
how about adding the original BASIC TAB(N) to the PowerBASIC?
In PB/CC, TAB() works as expected in conjunction with PRINT:
PRINT TAB(n); whatever$

If you're trying to use TAB() outside of PRINT... can't help you there.

(Personally, I don't use TAB(), I just position the cursor where I want it
via LOCATE.)
--
I'll just trot on down to the end of the line
and wait for my head to explode.
Loading...