Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Formatted PRINT in PowerBASIC

23 views
Skip to first unread message

Antti J Ylikoski

unread,
Mar 15, 2012, 1:34:55 PM3/15/12
to
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__

unread,
Mar 15, 2012, 7:01:45 PM3/15/12
to
Antti J Ylikoski wrote:

> 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

unread,
Mar 16, 2012, 8:05:03 AM3/16/12
to
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__

unread,
Mar 16, 2012, 11:48:00 AM3/16/12
to
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.
0 new messages