comp.lang.ada
 help / color / mirror / Atom feed
* newbie question
@ 1999-03-18  0:00 Kenneth Lee
  1999-03-18  0:00 ` Andreas Winckler
                   ` (3 more replies)
  0 siblings, 4 replies; 62+ messages in thread
From: Kenneth Lee @ 1999-03-18  0:00 UTC (permalink / raw)


just switched to Ada a few days.
can someone show me how can i have a universal sort routine
to sort arrays of integer and float? or even strings?
i tried to implement such a generic unit, but failed coz
i'm really new to Ada :P

thx in advance.

Kenneth

PS. is there any seperate code library like those perl packages?




^ permalink raw reply	[flat|nested] 62+ messages in thread
* Newbie question
@ 2000-05-25  0:00 olsonm76
  2000-05-26  0:00 ` Robert Dewar
  0 siblings, 1 reply; 62+ messages in thread
From: olsonm76 @ 2000-05-25  0:00 UTC (permalink / raw)


I have been working with a program written in ADA for the last year and
a half, on a SCO Unix OS.  Well I need to make some changes to the
program and have no idea where to find the compiler so I can start
reading the code. HELP please.


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 62+ messages in thread
* Newbie question
@ 2001-12-24 13:52 Jasbinder S  Uppal
  2001-12-24 20:06 ` Michal Nowak
  0 siblings, 1 reply; 62+ messages in thread
From: Jasbinder S  Uppal @ 2001-12-24 13:52 UTC (permalink / raw)


Hi, I've been subscribed to this news group for a long time (ok, when I
first started using Ada, about 2 months ago!), but this is the first time
I've actually had problems with the language and well, I was wondering if
you guys can help me.

I've got this assignment for university that I have to do, and I am having
problems with the first bit (Not a good sign, is it....).
I've got a data file, which contains a line of data for a vehicle, and on
the line, it gives a place name, a registration number, and the time that
the car goes onto a motorway. A typical line is as follows....

Barnsley    A123       22    15    40
....
....
Where Barnsley is the place, A123 is the Registration number, and 22  15
40 is the time (22:15:40). I've managed to get the Place name (using
characters) and the registration number (using Strings), and putting it into
a record, but I am unsure as to what to use for the time. I could (I think)
use characters, but I need to manipulate the times later on in the program
(which could be done by having the time as an integer), but because there
are blanks in between the numbers, I am unsure as to how I can do this. Help
me please....

I appreciate any help given.

Thanks.

J





^ permalink raw reply	[flat|nested] 62+ messages in thread
* Newbie Question.
@ 2004-08-04  6:42 leke
  2004-08-04  8:55 ` Frank
  2004-08-04  9:51 ` Martin Dowie
  0 siblings, 2 replies; 62+ messages in thread
From: leke @ 2004-08-04  6:42 UTC (permalink / raw)


1) What is the best bit of on-line reading a newbie to programming can
get for learning ADA?

2) Do the government still use ADA for what it was designed for?



^ permalink raw reply	[flat|nested] 62+ messages in thread
* newbie question...
@ 2005-07-03 17:58 e.coli
  2005-07-03 18:32 ` Dmitry A. Kazakov
  0 siblings, 1 reply; 62+ messages in thread
From: e.coli @ 2005-07-03 17:58 UTC (permalink / raw)


what is the difference?:

accept foo;
...
code


accept foo do
...
same code above
...
end foo;


thaks




^ permalink raw reply	[flat|nested] 62+ messages in thread
* Newbie question
@ 2005-07-18 11:26 Francisco J. Montoya
  2005-07-18 13:14 ` Martin Dowie
                   ` (2 more replies)
  0 siblings, 3 replies; 62+ messages in thread
From: Francisco J. Montoya @ 2005-07-18 11:26 UTC (permalink / raw)


Platform: WinXP SP2
Compiler: GNAT Public Ada 95 Environment 3.15p
(also using: AdaGide 7.30)

[apologies if this is a recurrente topic. I found nothing in the FAQ 
group list http://www.adahome.com/FAQ/comp-lang-ada.html]

------------------------------

Hello all.

Just a brief and (hopefully) easy question from a clumsy Ada newbie like me:

Is there any way to keep packages (writen by me, I mean) into a separate 
directory diffetent from the one where the program(s) that make use of 
them is(are)?

I figure out this could be done by setting right options in the dialog 
"Project settings", and "Debug/Release settings" -> "Compiler Options" 
and "Gnatmake" therein, but I haven't succeeded in finding them in the 
compiler documentation.

Thank you very much in advance, and accept my apologies for stealing 
your worthy time.

Regards,


P.S.: I'll be out from my office for August, so I would appreciate it if 
you were so nice to send me your answer (if any) to my personal account 
e-mail address instead of (or besides) replying to the group, if you do 
so in August or near. Thank you again.


-- 
Francisco J. Montoya
Depto. Informatica y Sistemas, Facultad de Informatica
(E-30071 Campus de Espinardo) Universidad de Murcia (Spain)
Voice: +34 968 364620, Fax: +34 968 364151, e-mail: fmontoya-AT-dif.um.es




^ permalink raw reply	[flat|nested] 62+ messages in thread
* Newbie question
@ 2007-11-23 13:22 Sir Chewbury Gubbins
  2007-11-23 14:01 ` Sir Chewbury Gubbins
  2007-11-24 16:49 ` Stephen Leake
  0 siblings, 2 replies; 62+ messages in thread
From: Sir Chewbury Gubbins @ 2007-11-23 13:22 UTC (permalink / raw)



Good afternoon! I apologise if this is an eye-rolly question, but
I'm having a bit of an issue using Gnat with the Lovelace tutorial.

A trivial example - the "Compute" procedure on:

http://www.adahome.com/Tutorials/Lovelace/s1sf.htm

contains a sub procedure which does:

	loop
		Put(X);
		New_Line(X);
		Double(X);
	end loop;

All fine - X is defined as an integer and initialised to 1. Now, if I
comment out the loop and end loop, the program outputs one as expected. 
If I duplicate the three lines and run it again, I get a 1 and a 2 as
expected. If I stick the infinite loop back in, I don't get the expected
series of doublings, but just an infinite number of zeros.

It *looks* as though X magically becomes out of scope within the loop, but
I can't see why that would be the case. 

Anyone shed any light on this?

Regards

Choobs

-- 
     Sir Chewbury Gubbins <choobs@chewbury.net.invalid>
 ...   Blog : http://www.nelefa.org
 /|\ 	 Game Diary : http://www.chewbury.net
/ | \      Abu the Monkey was never naughty.



^ permalink raw reply	[flat|nested] 62+ messages in thread
* Newbie question
@ 2009-03-12 13:29 Olivier Scalbert
  2009-03-12 13:48 ` Ludovic Brenta
                   ` (4 more replies)
  0 siblings, 5 replies; 62+ messages in thread
From: Olivier Scalbert @ 2009-03-12 13:29 UTC (permalink / raw)


Hello,

I start learning Ada and I try to define types for a chess engine.

I have create some "obvious" types:

     type Color_T is (White, Black);

     type PieceType_T is (Pawn, Knight, Bishop, Rook, Queen, King);

     type Piece_T is record
         Color: Color_T;
         PieceType: PieceType_T;
     end record;


Now, I want to create an array of 64 squares representing the chess 
board. A square should contain nothing or a Piece_T

I have tried:

     type Board_T is array(1..64) of Piece_T;

But I can not have an empty square !

What is the best way of doing that ?

Thanks,

Olivier



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

end of thread, other threads:[~2009-03-23  8:24 UTC | newest]

Thread overview: 62+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-18  0:00 newbie question Kenneth Lee
1999-03-18  0:00 ` Andreas Winckler
1999-03-19  0:00   ` Kenneth Lee
1999-03-19  0:00     ` Michael F Brenner
1999-03-19  0:00       ` ELMO
1999-03-21  0:00       ` Matthew Heaney
1999-03-18  0:00 ` Tom Moran
1999-03-18  0:00   ` Kenneth Lee
1999-03-18  0:00     ` Nick Roberts
1999-03-19  0:00 ` Michael F Brenner
1999-03-19  0:00   ` Nick Roberts
1999-03-20  0:00     ` Nick Roberts
1999-03-19  0:00 ` robert_dewar
  -- strict thread matches above, loose matches on Subject: below --
2000-05-25  0:00 Newbie question olsonm76
2000-05-26  0:00 ` Robert Dewar
2001-12-24 13:52 Jasbinder S  Uppal
2001-12-24 20:06 ` Michal Nowak
2001-12-24 21:13   ` martin.m.dowie
2001-12-25 12:36     ` Michal Nowak
2001-12-27 14:25       ` Alfred Hilscher
2001-12-29 21:54         ` Michal Nowak
2001-12-31 17:51           ` Jasbinder S Uppal
2002-01-01 21:26             ` Michal Nowak
2004-08-04  6:42 Newbie Question leke
2004-08-04  8:55 ` Frank
2004-08-04  9:51 ` Martin Dowie
2005-07-03 17:58 newbie question e.coli
2005-07-03 18:32 ` Dmitry A. Kazakov
2005-07-18 11:26 Newbie question Francisco J. Montoya
2005-07-18 13:14 ` Martin Dowie
2005-07-18 13:51   ` Alex R. Mosteo
2005-07-18 20:27     ` Martin Dowie
2005-07-18 15:28 ` Jeffrey Carter
2005-07-18 17:40 ` Martin Krischik
2007-11-23 13:22 Sir Chewbury Gubbins
2007-11-23 14:01 ` Sir Chewbury Gubbins
2007-11-24 16:49 ` Stephen Leake
2007-11-24 17:08   ` Peter C. Chapin
2007-11-25 19:25     ` Stephen Leake
2007-11-29  0:46   ` Robert A Duff
2009-03-12 13:29 Olivier Scalbert
2009-03-12 13:48 ` Ludovic Brenta
2009-03-12 14:16   ` Olivier Scalbert
2009-03-12 14:31     ` Ludovic Brenta
2009-03-12 14:32     ` stefan-lucks
2009-03-12 14:36       ` Ludovic Brenta
2009-03-12 17:14         ` stefan-lucks
2009-03-12 18:29           ` Adam Beneschan
2009-03-12 15:03       ` Jacob Sparre Andersen
2009-03-12 15:07   ` Robert A Duff
2009-03-12 17:16 ` Georg Bauhaus
2009-03-13  1:59 ` tmoran
2009-03-15 13:46 ` Olivier Scalbert
2009-03-21 18:08 ` Olivier Scalbert
2009-03-21 18:22   ` (see below)
2009-03-21 18:29     ` Olivier Scalbert
2009-03-21 18:36       ` Georg Bauhaus
2009-03-21 18:39         ` Olivier Scalbert
2009-03-22 12:40           ` (see below)
2009-03-22 13:19             ` Olivier Scalbert
2009-03-21 18:39       ` Jeffrey R. Carter
2009-03-23  8:24       ` Jean-Pierre Rosen

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