comp.lang.ada
 help / color / mirror / Atom feed
* Ada Question
@ 1996-12-10  0:00 William Gilreath
  1996-12-11  0:00 ` Kirk Beitz
  0 siblings, 1 reply; 10+ messages in thread
From: William Gilreath @ 1996-12-10  0:00 UTC (permalink / raw)



Hello everyone,

	I've just started learning Ada, but find the language very well 
structured and designed. One question I have is that can Ada retrieve command 
line arguements...if so, is it a standard in the language? Please E-mail me, 
and with no rants or flames....thanks in advance for your help.

			William





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

* Re: Ada Question
  1996-12-10  0:00 Ada Question William Gilreath
@ 1996-12-11  0:00 ` Kirk Beitz
  1996-12-13  0:00   ` MIROLO Sebastien
  0 siblings, 1 reply; 10+ messages in thread
From: Kirk Beitz @ 1996-12-11  0:00 UTC (permalink / raw)
  To: wfg1


wfg1@ra.msstate.edu (William Gilreath) writes:
> structured and designed. One question I have is that can Ada retrieve command 
> line arguements...if so, is it a standard in the language?

it is standard to the language.  it is called Ada.Command_Line .  it can be
found on the web at http://www.adahome.com/rm95/rm9x-A-15.html .  if you have
gnat installed on your un*x system, you can find it in the adainclude/
subdirectory of your installation.

--kirk beitz





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

* Re: Ada Question
  1996-12-11  0:00 ` Kirk Beitz
@ 1996-12-13  0:00   ` MIROLO Sebastien
  1996-12-14  0:00     ` Robert Dewar
  0 siblings, 1 reply; 10+ messages in thread
From: MIROLO Sebastien @ 1996-12-13  0:00 UTC (permalink / raw)



>> structured and designed. One question I have is that can Ada retrieve command 
>> line arguements...if so, is it a standard in the language?

> it is standard to the language.  it is called Ada.Command_Line .  it can be
> found on the web at http://www.adahome.com/rm95/rm9x-A-15.html .  if you have
> gnat installed on your un*x system, you can find it in the adainclude/
> subdirectory of your installation.
>
> --kirk beitz

This is fine if you got an Ada 95 compiler, but here we are always using an old
Ada 83 compiler (Alsys for MS-DOS). Could anyone remember how to retrieve command
line arguments in Ada 83 ?







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

* Re: Ada Question
  1996-12-13  0:00   ` MIROLO Sebastien
@ 1996-12-14  0:00     ` Robert Dewar
  0 siblings, 0 replies; 10+ messages in thread
From: Robert Dewar @ 1996-12-14  0:00 UTC (permalink / raw)



MIROLO Sebastian asked

"This is fine if you got an Ada 95 compiler, but here we are always using an old
Ada 83 compiler (Alsys for MS-DOS). Could anyone remember how to retrieve comman
d
line arguments in Ada 83 ?"



Be sure to say Ada 83 if you are talking about Ada 83 as opposed to
Ada 95. If you simply say Ada, people will assume you mean Ada 95, the
current version of the language, and not the old version which has been
superceded.

In Ada 83, there is no standard way of getting command line arguments.
It is implementation dependnet, and even varies from one compiler to another
from the same vendor.

But why not just consult your Alsys documentation (I know that the answer
is there, I helped write that documentation at the time!) You must have
full documentation if you have an Alsys compiler, since in those days
all Alsys compilers came with full paper documentation.






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

* Ada question
@ 2000-09-11  9:21 version_x
  2000-09-11 12:44 ` Ted Dennison
  0 siblings, 1 reply; 10+ messages in thread
From: version_x @ 2000-09-11  9:21 UTC (permalink / raw)


Is ada able to send data directly to the printer ports registers?
the reason i ask is that i have a neat little lcd display and i'd like to
write a program in ada to drive it.


rees





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

* Re: Ada question
  2000-09-11  9:21 Ada question version_x
@ 2000-09-11 12:44 ` Ted Dennison
  2000-09-11 13:13   ` version_x
  0 siblings, 1 reply; 10+ messages in thread
From: Ted Dennison @ 2000-09-11 12:44 UTC (permalink / raw)


version_x wrote:

> Is ada able to send data directly to the printer ports registers?
> the reason i ask is that i have a neat little lcd display and i'd like to
> write a program in ada to drive it.

A good first question is, "does my OS allow me to send data directly to the
printer port's registers?" If you don't know the answer to that one, go ask
it first in a newsgroup appropriate to your OS.

If you know the answer to be yes, then the next question would be, how is
this typically done under your OS?

--
T.E.D.

Home - mailto:dennison@telepath.com  Work - mailto:dennison@ssd.fsi.com
WWW  - http://www.telepath.com/dennison/Ted/TED.html  ICQ  - 10545591





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

* Re: Ada question
  2000-09-11 12:44 ` Ted Dennison
@ 2000-09-11 13:13   ` version_x
  0 siblings, 0 replies; 10+ messages in thread
From: version_x @ 2000-09-11 13:13 UTC (permalink / raw)




>


>A good first question is, "does my OS allow me to send data directly to the
>printer port's registers?" If you don't know the answer to that one, go ask
>it first in a newsgroup appropriate to your OS.
>

ok so i'll be using both linux and win98 and i know both are capable of
sending data to the parallel port registers.

>If you know the answer to be yes, then the next question would be, how is
>this typically done under your OS?
>


i've seen examples of code from both os's using asmembly language to address
the register directly, and since there's a previous answer here regarding
asm code inserted into ada using Machine_Operations_386 i'm guessing the
overall answer would be yes.

well seems i did know the answer in the first place, just had to think.



rees





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

* ada question
@ 2011-03-31 23:40 Robin
  2011-04-01  1:33 ` Nasser M. Abbasi
  2011-04-01  6:16 ` Simon Wright
  0 siblings, 2 replies; 10+ messages in thread
From: Robin @ 2011-03-31 23:40 UTC (permalink / raw)


how can you output an integer in ada without trailing new lines? it is
kinda hard to figure out. HEy thanks and fix probs.



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

* Re: ada question
  2011-03-31 23:40 ada question Robin
@ 2011-04-01  1:33 ` Nasser M. Abbasi
  2011-04-01  6:16 ` Simon Wright
  1 sibling, 0 replies; 10+ messages in thread
From: Nasser M. Abbasi @ 2011-04-01  1:33 UTC (permalink / raw)


On 3/31/2011 4:40 PM, Robin wrote:
> how can you output an integer in ada without trailing new lines? it is
> kinda hard to figure out. HEy thanks and fix probs.

Do you mean the extra space BEFORE the integer?

I did small example, and do not see an extra newline, but
see extra space only.

-------------------
with ada.text_io; use ada.text_io;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;

procedure t is
A: constant array (1..4) of integer  :=(2,3,4,5);
begin
   for i in A'range loop
       put(integer'image(A(i)));
       new_line;
   end loop;

   for i in A'range loop
       put(A(i));
       new_line;
   end loop;
end t;
---------------------------

When I run the above, I get:
---------------------------
  2
  3
  4
  5
           2
           3
           4
           5
$
-----------------------

Is this what you mean?

--Nasser



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

* Re: ada question
  2011-03-31 23:40 ada question Robin
  2011-04-01  1:33 ` Nasser M. Abbasi
@ 2011-04-01  6:16 ` Simon Wright
  1 sibling, 0 replies; 10+ messages in thread
From: Simon Wright @ 2011-04-01  6:16 UTC (permalink / raw)


Robin <r@thevoid1.net> writes:

> how can you output an integer in ada without trailing new lines? it is
> kinda hard to figure out. HEy thanks and fix probs.

Use Put rather than Put_Line, perhaps?

We could help better if you showed us what you've tried so far.



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

end of thread, other threads:[~2011-04-01  6:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-31 23:40 ada question Robin
2011-04-01  1:33 ` Nasser M. Abbasi
2011-04-01  6:16 ` Simon Wright
  -- strict thread matches above, loose matches on Subject: below --
2000-09-11  9:21 Ada question version_x
2000-09-11 12:44 ` Ted Dennison
2000-09-11 13:13   ` version_x
1996-12-10  0:00 Ada Question William Gilreath
1996-12-11  0:00 ` Kirk Beitz
1996-12-13  0:00   ` MIROLO Sebastien
1996-12-14  0:00     ` Robert Dewar

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