comp.lang.ada
 help / color / mirror / Atom feed
* GPS 4.4.1. ADA 95: Calling ASCII codes for ESC and display row colum control
@ 2011-01-10 13:44 Michael A
  2011-01-10 14:19 ` Dmitry A. Kazakov
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Michael A @ 2011-01-10 13:44 UTC (permalink / raw)


I know this topic was disucssed in the 90's on the forum and is an old
question, but. I am trying to control the display row,col for terminal
output of my ADA 95 simple program. I have tried several ways but to
no avail:

-- keep out put of a loop at line 20 column 20

put (ASCII.ESC & "[" & "20" & ";" & "20" & "H")  ;

put (ASCII.ESC&"[20;20H")  ;
put (ada.Characters.latin_1.ESC&"20"&";"&"20H");

put (Character'val (91) & "20;20H" );

I get the literal out put on the screen " <-20;20H " but not keeping
the output on line 20, col 20.

I do get put(ascii.bel); to ring the bell OK.



Thanks



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GPS 4.4.1. ADA 95: Calling ASCII codes for ESC and display row colum control
  2011-01-10 13:44 GPS 4.4.1. ADA 95: Calling ASCII codes for ESC and display row colum control Michael A
@ 2011-01-10 14:19 ` Dmitry A. Kazakov
  2011-01-10 19:29   ` Michael A
  2011-01-10 15:21 ` Alex Mentis
  2011-01-11 15:10 ` Peter Hermann
  2 siblings, 1 reply; 9+ messages in thread
From: Dmitry A. Kazakov @ 2011-01-10 14:19 UTC (permalink / raw)


On Mon, 10 Jan 2011 05:44:19 -0800 (PST), Michael A wrote:

> I know this topic was disucssed in the 90's on the forum and is an old
> question, but. I am trying to control the display row,col for terminal
> output of my ADA 95 simple program. I have tried several ways but to
> no avail:
> 
> -- keep out put of a loop at line 20 column 20
> 
> put (ASCII.ESC & "[" & "20" & ";" & "20" & "H")  ;
> 
> put (ASCII.ESC&"[20;20H")  ;
> put (ada.Characters.latin_1.ESC&"20"&";"&"20H");
> 
> put (Character'val (91) & "20;20H" );
> 
> I get the literal out put on the screen " <-20;20H " but not keeping
> the output on line 20, col 20.
> 
> I do get put(ascii.bel); to ring the bell OK.

What makes you think that GPS' run-panel emulates VT100?

And, is it the GPS GUI where your output goes?

Anyway GPS is GTK-based. Presumably, it uses the GTK text buffer object
where the program standard output goes. So you should look here:

http://www.adacore.com/wp-content/files/auto_update/gtkada-docs/gtkada_rm/gtkada_rm/gtk-text_buffer.ads.html

to learn for how to control it and its view:

http://www.adacore.com/wp-content/files/auto_update/gtkada-docs/gtkada_rm/gtkada_rm/gtk-text_view.ads.html

If you mean something else, like console output, then depending on the OS
and the terminal emulator you might need different control sequences. If
you want to use the VT100 ones, you should get a VT100 emulator.

BTW, Windows' cmd.exe does not emulate VT100.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GPS 4.4.1. ADA 95: Calling ASCII codes for ESC and display row colum control
  2011-01-10 13:44 GPS 4.4.1. ADA 95: Calling ASCII codes for ESC and display row colum control Michael A
  2011-01-10 14:19 ` Dmitry A. Kazakov
@ 2011-01-10 15:21 ` Alex Mentis
  2011-01-10 19:33   ` Michael A
  2011-01-11  2:00   ` Randy Brukardt
  2011-01-11 15:10 ` Peter Hermann
  2 siblings, 2 replies; 9+ messages in thread
From: Alex Mentis @ 2011-01-10 15:21 UTC (permalink / raw)


Michael A wrote:

> I am trying to control the display row,col for terminal
> output of my ADA 95 simple program. 

If you're trying to get this to work on Windows, you might find what
you need at http://users.ncrvnet.nl/gmvdijk/packages.html

I've used the "Win32 version of Mike Feldmans SCREEN package".  Last
time I checked, this worked with Windows' cmd.exe.  It will *not* work
in the GPS run window, though.  You can use the Screen package
outright, or just look at the source to see what's involved to write
your own code.

You might also look at the "NT/Win95 Console package".  I haven't used
that one myself, but it looks like it's generally along the same lines
as the Screen package.

-Alex



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GPS 4.4.1. ADA 95: Calling ASCII codes for ESC and display row colum control
  2011-01-10 14:19 ` Dmitry A. Kazakov
@ 2011-01-10 19:29   ` Michael A
  2011-01-10 22:36     ` Yannick Duchêne (Hibou57)
  0 siblings, 1 reply; 9+ messages in thread
From: Michael A @ 2011-01-10 19:29 UTC (permalink / raw)


On Jan 10, 9:19 am, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
wrote:
> On Mon, 10 Jan 2011 05:44:19 -0800 (PST), Michael A wrote:
> > I know this topic was disucssed in the 90's on the forum and is an old
> > question, but. I am trying to control the display row,col for terminal
> > output of my ADA 95 simple program. I have tried several ways but to
> > no avail:
>
> > -- keep out put of a loop at line 20 column 20
>
> > put (ASCII.ESC & "[" & "20" & ";" & "20" & "H")  ;
>
> > put (ASCII.ESC&"[20;20H")  ;
> > put (ada.Characters.latin_1.ESC&"20"&";"&"20H");
>
> > put (Character'val (91) & "20;20H" );
>
> > I get the literal out put on the screen " <-20;20H " but not keeping
> > the output on line 20, col 20.
>
> > I do get put(ascii.bel); to ring the bell OK.
>
> What makes you think that GPS' run-panel emulates VT100?
>
> And, is it the GPS GUI where your output goes?
>
> Anyway GPS is GTK-based. Presumably, it uses the GTK text buffer object
> where the program standard output goes. So you should look here:
>
> http://www.adacore.com/wp-content/files/auto_update/gtkada-docs/gtkad...
>
> to learn for how to control it and its view:
>
> http://www.adacore.com/wp-content/files/auto_update/gtkada-docs/gtkad...
>
> If you mean something else, like console output, then depending on the OS
> and the terminal emulator you might need different control sequences. If
> you want to use the VT100 ones, you should get a VT100 emulator.
>
> BTW, Windows' cmd.exe does not emulate VT100.
>
> --
> Regards,
> Dmitry A. Kazakovhttp://www.dmitry-kazakov.de- Hide quoted text -
>
> - Show quoted text -

Thanks. My output is not to the GPS GUI but to a Windows command
window. I suspected the controls could be different in different
enviornments. I will check out your recommendations.

Tks



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GPS 4.4.1. ADA 95: Calling ASCII codes for ESC and display row colum control
  2011-01-10 15:21 ` Alex Mentis
@ 2011-01-10 19:33   ` Michael A
  2011-01-11  2:00   ` Randy Brukardt
  1 sibling, 0 replies; 9+ messages in thread
From: Michael A @ 2011-01-10 19:33 UTC (permalink / raw)


On Jan 10, 10:21 am, "Alex Mentis" <f...@invalid.invalid> wrote:
> Michael A wrote:
> > I am trying to control the display row,col for terminal
> > output of my ADA 95 simple program.
>
> If you're trying to get this to work on Windows, you might find what
> you need athttp://users.ncrvnet.nl/gmvdijk/packages.html
>
> I've used the "Win32 version of Mike Feldmans SCREEN package".  Last
> time I checked, this worked with Windows' cmd.exe.  It will *not* work
> in the GPS run window, though.  You can use the Screen package
> outright, or just look at the source to see what's involved to write
> your own code.
>
> You might also look at the "NT/Win95 Console package".  I haven't used
> that one myself, but it looks like it's generally along the same lines
> as the Screen package.
>
> -Alex

Thanks



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GPS 4.4.1. ADA 95: Calling ASCII codes for ESC and display row colum control
  2011-01-10 19:29   ` Michael A
@ 2011-01-10 22:36     ` Yannick Duchêne (Hibou57)
  0 siblings, 0 replies; 9+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2011-01-10 22:36 UTC (permalink / raw)


Le Mon, 10 Jan 2011 20:29:17 +0100, Michael A <michael.m.ayres@gmail.com>  
a écrit:
> Thanks. My output is not to the GPS GUI but to a Windows command
> window. I suspected the controls could be different in different
> enviornments. I will check out your recommendations.
Unfortunately, starting with Windows XP (do not know about Windows 2000),  
Windows seems to not support anymore ANSI Escape codes which support was  
provided by ANSI.SYS. I searched the web about it, but fail to find  
anything to make this ANSI.SYS working again.

I use to use terminal command too with Ada, but it stopped working since I  
switched from Windows 98 to Windows XP:
http://www.les-ziboux.rasama.org/ada-commandes-echappement-ansi.html
The page is French, but the source is still English.
And an example use:
http://www.les-ziboux.rasama.org/ada-programme-test-commandes-ansi.html
(rather old, 4 years ago)

-- 
Si les chats miaulent et font autant de vocalises bizarres, c’est pas pour  
les chiens.

“I am fluent in ASCII” [Warren 2010]



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GPS 4.4.1. ADA 95: Calling ASCII codes for ESC and display row colum control
  2011-01-10 15:21 ` Alex Mentis
  2011-01-10 19:33   ` Michael A
@ 2011-01-11  2:00   ` Randy Brukardt
  1 sibling, 0 replies; 9+ messages in thread
From: Randy Brukardt @ 2011-01-11  2:00 UTC (permalink / raw)


"Alex Mentis" <foo@invalid.invalid> wrote in message 
news:igf86g$lpa$1@news.eternal-september.org...
> Michael A wrote:
>
>> I am trying to control the display row,col for terminal
>> output of my ADA 95 simple program.
...
> You might also look at the "NT/Win95 Console package".  I haven't used
> that one myself, but it looks like it's generally along the same lines
> as the Screen package.

Not that it will help the OP much, but the Janus/Ada runtime libraries 
include a package called System.NT_Console, which provides access to the 
various console operations of Win32. With that package, he'd get the 
standard output console handle (only need to do once), then call 
Set_Console_Cursor_Position to set the position, and then do his write. It 
would be easy to wrap that to make it easier.

For GNAT, I would presume the needed operations are available in the Win32 
packages (not sure about the details), although it is easy enough to write 
pragma Imports to bind them yourself.

                                Randy.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GPS 4.4.1. ADA 95: Calling ASCII codes for ESC and display row colum control
  2011-01-10 13:44 GPS 4.4.1. ADA 95: Calling ASCII codes for ESC and display row colum control Michael A
  2011-01-10 14:19 ` Dmitry A. Kazakov
  2011-01-10 15:21 ` Alex Mentis
@ 2011-01-11 15:10 ` Peter Hermann
  2011-01-11 18:42   ` Ludovic Brenta
  2 siblings, 1 reply; 9+ messages in thread
From: Peter Hermann @ 2011-01-11 15:10 UTC (permalink / raw)


Michael A <michael.m.ayres@gmail.com> wrote:
> I do get put(ascii.bel); to ring the bell OK.

Does somebody happen to know, why the hell this does not work under ubuntu?

hoping for help...
your
http://www.ihr.uni-stuttgart.de/forschung/ada/resources_on_ada/



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GPS 4.4.1. ADA 95: Calling ASCII codes for ESC and display row colum control
  2011-01-11 15:10 ` Peter Hermann
@ 2011-01-11 18:42   ` Ludovic Brenta
  0 siblings, 0 replies; 9+ messages in thread
From: Ludovic Brenta @ 2011-01-11 18:42 UTC (permalink / raw)


Peter Hermann writes on comp.lang.ada:
> Michael A <michael.m.ayres@gmail.com> wrote:
>> I do get put(ascii.bel); to ring the bell OK.
>
> Does somebody happen to know, why the hell this does not work under ubuntu?

This issue is not specific to Ubuntu but specific to the particular
terminal emulator program you use, and its configuration.

-- 
Ludovic Brenta.



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-01-11 18:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-10 13:44 GPS 4.4.1. ADA 95: Calling ASCII codes for ESC and display row colum control Michael A
2011-01-10 14:19 ` Dmitry A. Kazakov
2011-01-10 19:29   ` Michael A
2011-01-10 22:36     ` Yannick Duchêne (Hibou57)
2011-01-10 15:21 ` Alex Mentis
2011-01-10 19:33   ` Michael A
2011-01-11  2:00   ` Randy Brukardt
2011-01-11 15:10 ` Peter Hermann
2011-01-11 18:42   ` Ludovic Brenta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox