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

How to print Extended ASCII Characters

548 views
Skip to first unread message

flowergirl

unread,
Jan 31, 2010, 4:40:44 PM1/31/10
to
How do I print from the Extended ASCII Character Set (IBM Character
Set) with Compaq Visual Fortran 6.5? For example, using the DOS
editor or MS Word and entering Alt 219 (numeric key pad) displays the
box type character █. I can put this into a Powerstation 1.0 write
statement and it prints successfully. However CVF 6.5 displays the |
character instead. The same goes for other extended ASCII characters.

robin

unread,
Jan 31, 2010, 6:30:10 PM1/31/10
to
"flowergirl" <senho...@hotmail.com> wrote in message
news:a8586b73-12b1-4489...@e37g2000yqn.googlegroups.com...

|How do I print from the Extended ASCII Character Set (IBM Character
|Set) with Compaq Visual Fortran 6.5? For example, using the DOS
|editor or MS Word and entering Alt 219 (numeric key pad) displays the

|box type character ?. I can put this into a Powerstation 1.0 write


|statement and it prints successfully. However CVF 6.5 displays t|he
|character instead. The same goes for other extended ASCII characters.

How are you generating the characters?


flowergirl

unread,
Jan 31, 2010, 7:28:37 PM1/31/10
to
On Jan 31, 5:30 pm, "robin" <robi...@bigpond.com> wrote:
> "flowergirl" <senhorto...@hotmail.com> wrote in message

Here's an example:

If the following program is compiled and run with Compaq Visual
Fortran 6.5 as a console application, the result is a box printed with
ASCII text based characters (corners, horizontal lines, and vertical
lines).

write(*,*) char(218),char(196),char(191)
write(*,*) char(179),' ' ,char(179)
write(*,*) char(192),char(196),char(217)
end

But if the same program is compiled and run as a standard graphics or
quick win application, a list of character codes gets printed instead.

Arjen Markus

unread,
Feb 1, 2010, 6:14:45 AM2/1/10
to

This has little to do with Fortran and everything with the display
method.
The characters you want to print are outside the ordinary ASCII range
and
therefore the graphical representation is subject to such things as
code pages.

These graphic characters you are trying to use are not present in
other
code pages or are in a different position. (I have never quite
understood
the terminology but it has to do with OEM versus ASCII)

Regards,

Arjen

Steve Lionel

unread,
Feb 1, 2010, 5:19:09 PM2/1/10
to

I have not found a way to do this. Console applications, and
PowerStation 1.0 )(which was a DOS product), use the "OEM 437" codepage
for output. This DOES have a corresponding font, "MS-DOS CP 437", but
this is not a font you can select in a QuickWin application (which a
later post of yours said you wanted to do.)

--
Steve Lionel
Developer Products Division
Intel Corporation
Nashua, NH

For email address, replace "invalid" with "com"

User communities for Intel Software Development Products
http://software.intel.com/en-us/forums/
Intel Software Development Products Support
http://software.intel.com/sites/support/
My Fortran blog
http://www.intel.com/software/drfortran

robin

unread,
Feb 1, 2010, 6:32:26 PM2/1/10
to
"flowergirl" <senho...@hotmail.com> wrote in message
news:f24620c8-ec69-46e7...@21g2000yqj.googlegroups.com...

>On Jan 31, 5:30 pm, "robin" <robi...@bigpond.com> wrote:
>> "flowergirl" <senhorto...@hotmail.com> wrote in message
>>
>> news:a8586b73-12b1-4489...@e37g2000yqn.googlegroups.com...
>
>> |How do I print from the Extended ASCII Character Set (IBM Character
>> |Set) with Compaq Visual Fortran 6.5? For example, using the DOS
>> |editor or MS Word and entering Alt 219 (numeric key pad) displays the
>> |box type character ?. I can put this into a Powerstation 1.0 write
>> |statement and it prints successfully. However CVF 6.5 displays t|he
>> |character instead. The same goes for other extended ASCII characters.
>
>> How are you generating the characters?

>Here's an example:

>If the following program is compiled and run with Compaq Visual
>Fortran 6.5 as a console application, the result is a box printed with
>ASCII text based characters (corners, horizontal lines, and vertical
>lines).

>write(*,*) char(218),char(196),char(191)
>write(*,*) char(179),' ' ,char(179)
>write(*,*) char(192),char(196),char(217)
>end

Have you tried using an A-format?

robin

unread,
Feb 2, 2010, 6:35:23 PM2/2/10
to
"flowergirl" <senho...@hotmail.com> wrote in message
news:a8586b73-12b1-4489...@e37g2000yqn.googlegroups.com...

"How do I print from the Extended ASCII Character Set (IBM Character
"Set) with Compaq Visual Fortran 6.5? For example, using the DOS
"editor or MS Word and entering Alt 219 (numeric key pad) displays the
"box type character ?. I can put this into a Powerstation 1.0 write

"statement and it prints successfully. However CVF 6.5 displays the |

How did my suggestion go?
Do you want more ideas?


flowergirl

unread,
Feb 3, 2010, 1:39:30 PM2/3/10
to
On Feb 2, 5:35 pm, "robin" <robi...@bigpond.com> wrote:
>
> How did my suggestion go?
> Do you want more ideas?

The A-format has the same result as in this variation of my previous
example:

write(*,10) char(218),char(196),char(191)
write(*,10) char(179),' ' ,char(179)
write(*,10) char(192),char(196),char(217)
10 format(3a1)
end

I have a textual user interface (TUI) that I developed with
Powerstation 1.0 under Windows 95. Powerstation does not compile
under Windows XP. I would like to make my TUI available for other
compiler and operating systems.

dpb

unread,
Feb 3, 2010, 1:57:27 PM2/3/10
to
flowergirl wrote:
> On Feb 2, 5:35 pm, "robin" <robi...@bigpond.com> wrote:
>> How did my suggestion go?
>> Do you want more ideas?
>
> The A-format has the same result as in this variation of my previous
> example:
>
> write(*,10) char(218),char(196),char(191)
> write(*,10) char(179),' ' ,char(179)
> write(*,10) char(192),char(196),char(217)
> 10 format(3a1)
> end
>
...

Works fine (assuming intent is a hollow outline box figure) w/ CVF 6.6
in console mode under XP.

As expected, and as Steve L notes, this _WON'T_ work in an actual
Windows session mode app.

But, if the intent is a TUI, what's wrong w/ building console app, anyway?

--

0 new messages