comp.lang.ada
 help / color / mirror / Atom feed
* Help!
@ 1990-01-24  1:26 Rowan D. Stevens
  0 siblings, 0 replies; 48+ messages in thread
From: Rowan D. Stevens @ 1990-01-24  1:26 UTC (permalink / raw)



 ----  HELP!  ----

I am looking for information about either a user interface methodology, a
name of a research paper, an actual CASE tool or development environment, or
anything which might help me to locate the following:-

A tool or method which will allow a user interface to be developed visually
(similiar to Microsoft's Dialog Box Editor) but will output the operational
interface shell in some object-oriented programming type language (ie. c++)
The method should allow modelling of window-oriented and text user interfaces.
Anything close to this, I would still like to hear about.

If someone out there is carrying out research in this or a similar area, then I
would be very interested in talking further about this.

I can be contacted at:

	Royal Melbourne Institute of Technology
	C/-Department of Computer Science
	GPO BOX 2476V
	Melbourne, Vic 3001
	Australia

	Phone: +61-3-660-3216  
	ACSnet: rds@goanna.rmit.oz

Much appreciated!

Regards --> Rowan Stevens

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

* Help !!!!
@ 1990-07-07  7:23 1LENDL
  0 siblings, 0 replies; 48+ messages in thread
From: 1LENDL @ 1990-07-07  7:23 UTC (permalink / raw)


Hi all, I need some ADA help.
 ( I hope there are some ADA-freaks here ! )

Question 1:
        I have to read a Text-file. All works well with GET_LINE. BUT :
        The file is from an IBM-PC, and it is in German that means there
        are the special German characters ( Umlaute, scharfes S ) in it.
        These characters are encoded as 132, 142, ... all above 127 !
        As far as I know, the type character is defined as an enumeration,
        from 0 to 127, so the special characters are not defined in it.
        Funny enough, when I try to read such characters I do not get
        any error, exception or other faults. When I "put" it afterwards,
        the original special character is written.
        Anyway, I want to make a CASE statement over all characters read:

        case char is
            when 'a' .. 'z' =>     -- This works fine
            when character'pos(132) =>  -- This gives a compiler-error:
                                        -- "Choices have to be static"

        What shall I do ? Making an IF-clause out of it ?
                ( is character'pos(132) legal ? )

Question 2:
        I want to read/write a simple file with no structure, a simple
        stream of bytes. I tried it with :

        type BYTE is range 0 .. 255;
        for BYTE'SIZE use 8;
        package byte_io is new DIRECT_IO ( Element_type => BYTE );
        ...
        byte_io.write ( fh, byte(34) );
        ...

        In the file there is the Value I wanted to write, then a 0, a value,
        a 0, ....     Why THAT ????
        ( Thinks were easy in C .... )

        What have I done wrong ?

I use the SYSTEAM Ada compiler on a VAX running VMS.

Please send all help for DIRECT to me, for I'm not on this List.
                        ========
( No time for reading so much mail ! )

Thanks !

--Otmar Lendl--

   3\  3  3\ /3  3\   3\  3  3\     3   3\/3     3\   /\   3\  /3\  3\  3\
   3\  X  3 X 3  3 3  3/  3  3   o  3>  3  3  o  3\  3  3  3\   3   3\  3/
   3   3  3/ \3  3 3  3\  3  3      3   3  3     3   3  3  3    3   3   3\

                      1LENDL@EDVZ.UNI-SALZBURG.ADA.AT
                         PSI%023225629007::1LENDL

And for the ones, who don't know where Austria is :
                 1lendl%edvz.uni-salzburg.ada.at@CUNYVM.CUNY.EDU

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

* HELP!
@ 1990-08-31 20:21 "Thomas H. Stripe  255-4472", 513
  1990-09-05 16:27 ` HELP! Edward Falis
  0 siblings, 1 reply; 48+ messages in thread
From: "Thomas H. Stripe  255-4472", 513 @ 1990-08-31 20:21 UTC (permalink / raw)



I am trying to reconstruct my Ada library into the installation family
(Note: I am using ALSYS Ada compiler version 4.3) by the following:

Ada.MEND (LIBRARY => RESTORE.LST, FAMILY => INSTALLATION)

RESTORE.LST contains three file names: D:\ALSYS\PREDEF, D:\ALSYS\ALTERNAT, and
D:\SOME_LIB. D:\SOME_LIB is the library I am trying to mend. The problem is
that I get the following error:

FAMILY_MANAGER: ERROR: The library D:\SOME_LIB does not belong to the
same family (D:\ALSYS\INST_FAM) as D:\ALSYS\ALTERNAT (D:\ALSYS\INST_FAM)

My question is this, Has anybody encountered this, and if so, do you know
of a work-around?

Thanks
Tom

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

* Re: HELP!
  1990-08-31 20:21 HELP! "Thomas H. Stripe  255-4472", 513
@ 1990-09-05 16:27 ` Edward Falis
  0 siblings, 0 replies; 48+ messages in thread
From: Edward Falis @ 1990-09-05 16:27 UTC (permalink / raw)


My guess is that the user library you wanted to restore with the MEND
command was actually in the PUBLIC family, rather than INSTALLATION.

So...

I assume that the medn on the installation family is already done.  If
not , edit the file listing the libraries so it does not include the
name of the user library.

Reissue the mend command on the installation family.

Now, to mend the public family, create a file foo, place the path
of the user library in the file, enter the family manager, and
type:

mend foo, public

Also note that the mend command applies to families, not libraries.

If you have any further questions, give our support line a call
at (617) 270-0030

- Ed Falis, Alsys

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

* Help!
@ 1990-09-23 13:52 Ken McCook;SCDQ;
  1990-09-25 16:23 ` Help! Michael Feldman
                   ` (2 more replies)
  0 siblings, 3 replies; 48+ messages in thread
From: Ken McCook;SCDQ; @ 1990-09-23 13:52 UTC (permalink / raw)


I'm working on a MIS project to be hosted on PC using MS-DOS
and Ada. Have Alsys PC286 Ada Compiler.

Does anyone have experience on printed output to standard 
government forms.

I'd prefer to write directly to the printer, but I could live
with having to write to a file and then printing the file.

I had hoped that Ada's Text_IO would have the capabilities 
Turbo Pascal has for directing output directly to the printer 
using Write and WriteLn? (And I'd hoped for direct keyboard
reading as well like someone else on the net in recent days.
Something like Turbo's "Read (kbd, X);".)

I am desperate for examples of source code and some expert
advice on this oneand would greatly appreciate any help.

Thanks,

Ken McCook     Computer Programmer     Warner Robins Air Logistics Center
kmccook@wrdis01.af.mil        (912) 926-7709         (DSN) 468-7709

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

* Re: Help!
  1990-09-23 13:52 Help! Ken McCook;SCDQ;
@ 1990-09-25 16:23 ` Michael Feldman
  1990-09-26 16:27 ` Help! Andy DeFaria
  1990-09-26 19:26 ` Help! Andy DeFaria
  2 siblings, 0 replies; 48+ messages in thread
From: Michael Feldman @ 1990-09-25 16:23 UTC (permalink / raw)


In article <9009241422.AA17160@wrdis01.af.mil> kmccook@WRDIS01.AF.MIL (Ken McCook;SCDQ;) writes:
>I'm working on a MIS project to be hosted on PC using MS-DOS
>and Ada. Have Alsys PC286 Ada Compiler.
>
>I'd prefer to write directly to the printer, but I could live
>with having to write to a file and then printing the file.

You probably can write to the printer. See below.
>
>I had hoped that Ada's Text_IO would have the capabilities 
>Turbo Pascal has for directing output directly to the printer 
>using Write and WriteLn? (And I'd hoped for direct keyboard
>reading as well like someone else on the net in recent days.
>Something like Turbo's "Read (kbd, X);".)

Text_IO does have "hooks" for doing this. Every CREATE or OPEN call
associates a file variable in your program with a string representing
the file's name as known to the operating system. I'm not all that
familiar with the Alsys system, but conjecture based on experience that
they provide a standard file name something like PRN or LPT1. Using
Meridian Ada, you'd write

    My_File_Name: Text_IO.File_Type;

    ......

    Text_IO.Create(File => My_File_Name, 
                   Mode => Text_IO.Out_File,
                   Name => "PRN");

and then all PUTs to My_File_Name would go to the printer. No, Ada does not
predefine the standard names, but probably it could not easily do so
because file naming conventions differ greatly from OS to OS (consider
DOS names with their 8-character limit vs. Unix names, etc. etc.).

So Ada does it JUST LIKE THE OTHER LANGUAGES, leaving it to the programmer
to do the mapping with a Create or Open call. Turbo Pascal is an exception,
not the rule, and can get away with it because Turbo Pascal exists (currently)
only for the DOS world. What is called Turbo Pascal for the Macintosh, for
example, is an entirely different Pascal-like language. And surely the
file names are different between DOS and MacOS.

The bottom line: most likely Alsys provides the standard DOS file names
for you to use. Try it.
---------------------------------------------------------------------------
Prof. Michael Feldman
Department of Electrical Engineering and Computer Science
The George Washington University
Washington, DC 20052
202-994-5253
mfeldman@seas.gwu.edu
---------------------------------------------------------------------------

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

* Re: Help!
  1990-09-23 13:52 Help! Ken McCook;SCDQ;
  1990-09-25 16:23 ` Help! Michael Feldman
@ 1990-09-26 16:27 ` Andy DeFaria
  1990-09-26 19:26 ` Help! Andy DeFaria
  2 siblings, 0 replies; 48+ messages in thread
From: Andy DeFaria @ 1990-09-26 16:27 UTC (permalink / raw)


>/ hpclapd:comp.lang.ada / kmccook@WRDIS01.AF.MIL (Ken McCook;SCDQ;) /  6:52 am  Sep 23, 1990 /

>I'd prefer to write directly to the printer, but I could live
>with having to write to a file and then printing the file.

>I had hoped that Ada's Text_IO would have the capabilities 
>Turbo Pascal has for directing output directly to the printer 
>using Write and WriteLn? (And I'd hoped for direct keyboard
>reading as well like someone else on the net in recent days.
>Something like Turbo's "Read (kbd, X);".)

The  simple, quick  and  dirty answer is to  write  your  routines in Turbo
Pascal and pragma INTERFACE to them.  Write a general purpose TP routine to
Write_to_Printer and a  Read_From_Keyboard  then encapsulate  the interface
into an Ada package pragma INTERFACEing to your TP routines.

But you may  want to check  out the Ada way of  writing to a  file and have
that file point   to a printer.  I haven't   done this but  I'm sure   it's
possible. 

WRT  reading from the  keyboard, if you want anykind  of real control  over
what is read then you might want to interface to TP or TC or whatever.   If
you  are  simply   reading  in stuff   then  you could use  TEXT_IO.GET  or
TEXT_IO.GET_LINE. 

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

* Re: Help!
  1990-09-23 13:52 Help! Ken McCook;SCDQ;
  1990-09-25 16:23 ` Help! Michael Feldman
  1990-09-26 16:27 ` Help! Andy DeFaria
@ 1990-09-26 19:26 ` Andy DeFaria
  2 siblings, 0 replies; 48+ messages in thread
From: Andy DeFaria @ 1990-09-26 19:26 UTC (permalink / raw)


>/ hpclapd:comp.lang.ada / defaria@hpclapd.HP.COM (Andy DeFaria) /  9:27 am  Sep 26, 1990 /
>
>The  simple, quick  and  dirty answer is to  write  your  routines in Turbo
>Pascal and pragma INTERFACE to them.  Write a general purpose TP routine to
>Write_to_Printer and a  Read_From_Keyboard  then encapsulate  the interface
>into an Ada package pragma INTERFACEing to your TP routines.

Oops!  Open my  mouth and  insert foot.   I shouldn't have  even  suggested
this.  The Alsys compiler doesn't do pragma INTERFACE  to TP (or any Pascal
for that matter).  But there are Ada solutions to writing to the printer.  

I'm not sure about reading  from the keyword.  Easy  things can be  done by
TEXT_IO.GET[_LINE].  Single character I/O and  special character I/O may be
a bit more tricky.   Check  you Ada manuals first  before trying to  pragma
INTERFACE.

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

* HELP!!!
@ 1996-03-27  0:00 ~ AnTY ~
  0 siblings, 0 replies; 48+ messages in thread
From: ~ AnTY ~ @ 1996-03-27  0:00 UTC (permalink / raw)


Hiya!

I was wondering if there's a way to stop a screen from scrolling and
pausing after a certain amount of line i.e 24 is printed. Furthermore allows
the screen to scroll once a key's pressed. I'm currently using gnat3.03 with
the new Ada95.

Thank you for yout time.

anty.

--
                                            . . . . o o o o o
    __________________________=======             _____      o       _______
    | ahuynh@yallara.cs.rmit.edu.au  |   ____====  ]OO|_n_n__][.     |Anty |
    |________________________________|__[________]_|__|________)<    |Ville|
    'OOOO=====|ooo|====|ooo|=====|OOOO\ oo|====|oo 'oo=OOOO-|=oo\_   ~~~|~~~
--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+




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

* Re: Help!
  1996-10-01  0:00 Help! Cheryl Earnest
@ 1996-10-01  0:00 ` John Herro
  1996-10-02  0:00   ` Help! Jean-Etienne Doucet
  1996-10-01  0:00 ` Help! Samuel Tardieu
  1 sibling, 1 reply; 48+ messages in thread
From: John Herro @ 1996-10-01  0:00 UTC (permalink / raw)



Cheryl Earnest <cherie@labyrinth.cftnet.com> writes:
>The Compilation error is "invalid paramater in call" ...
>    package flt_io is new Float_Io(Float);
>    package int_io is new Integer_Io(Integer);
>    package boolean_io is new enumeration_io(Boolean);
> ...
>    put_line(net_pay, AFT=>2,EXP=>0);

     The put_line above should be changed to

put(net_pay, AFT=>3,EXP=>0);
new_line;

because Float_IO (and therefore flt_io) doesn't have a put_line, only a
put.  (The new_line in the corrected code above will come from Text_IO.)

     Also, since you're not using dot notation for the packages, you
should add USE clauses to your three instantiations, like this:

package flt_io is new Float_Io(Float); use flt_io;
package int_io is new Integer_Io(Integer); use int_io;
package boolean_io is new enumeration_io(Boolean); use boolean_io;

     That should fix everything.  When you run the program and type the
number of dependents, don't forget that you're inputting a float.  E.g.,
type "3.0", not "3".  I hope this helps.
- John Herro
Software Innovations Technology
http://members.aol.com/AdaTutor
ftp://members.aol.com/AdaTutor




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

* Re: Help!
  1996-10-01  0:00 ` Help! Samuel Tardieu
  1996-10-01  0:00   ` Help! Larry Kilgallen
@ 1996-10-01  0:00   ` Keith Thompson
  1 sibling, 0 replies; 48+ messages in thread
From: Keith Thompson @ 1996-10-01  0:00 UTC (permalink / raw)



In <qw6afu7vuqk.fsf@gargantua.enst.fr> Samuel Tardieu <sam@ada.eu.org> writes:
[...]
> You need to add the line:
> 
>   use flt_io;
> 
> to make subprograms visible after the line which defines
> flt_io. Another alternative is to use flt_io.put_line instead of
> put_line.

There is no Put_Line in Float_IO.

-- 
Keith Thompson (The_Other_Keith) kst@thomsoft.com <*>
TeleSoft^H^H^H^H^H^H^H^H Alsys^H^H^H^H^H Thomson Software Products
10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2706
FIJAGDWOL




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

* Help!
@ 1996-10-01  0:00 Cheryl Earnest
  1996-10-01  0:00 ` Help! John Herro
  1996-10-01  0:00 ` Help! Samuel Tardieu
  0 siblings, 2 replies; 48+ messages in thread
From: Cheryl Earnest @ 1996-10-01  0:00 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 228 bytes --]

Can someone please help me with the attached program.
I think that my problem has to do with the gross_pay 
variable.

I just can't see what the problem is.  The Compilation error is
"invalid paramater in call"

Thanks,

Cherie

[-- Attachment #2: cherieprog2.adb --]
[-- Type: text/plain, Size: 3138 bytes --]

--Cheryl Earnest (cherie) 593-48-8506
--Intro to Computer Science Lab
--Assignment 2 Due: September ?

with Text_Io; use Text_Io;

procedure cherieprog2 is
	package flt_io is new Float_Io(Float);
	package int_io is new Integer_Io(Integer);
	package boolean_io is new enumeration_io(Boolean);

	name: String(1..30);
	length: Integer;
	hours_worked: Float;
	hourly_rate: Float;
	dependents: Float;
	union_member: Character;
	union_dues: Float;
	federal_tax: Float;
	social_security: Float;
	gross_pay: Float;

	procedure gross(hours_worked, hourly_rate: in Float; gross_pay: out Float) is
		overtime: Float;
		regular: constant := 40.0;
	begin
		if hours_worked > regular then
			overtime := hours_worked - regular;
			gross_pay := ((hours_worked * hourly_rate) + (overtime * 1.5 * hourly_rate));	
		elsif hours_worked <= regular then
			overtime := 0.0;
			gross_pay := (hours_worked * hourly_rate);
		end if;
	end gross;			

	function tax(gross_pay, dependents: Float) return Float is
        begin
                if gross_pay > 150.0 then
                        return(gross_pay - (13.0 * dependents));
                elsif gross_pay <= 150.0 then
                        return(0.0);
                end if;
	return(0.0);
        end tax;	

	function ssecurity(gross_pay: Float) return Float is
        begin
                if gross_pay > 150.0 then
                        return(0.052 * gross_pay);
                elsif gross_pay <= 150.0 then
                        return(0.0);
                end if;
	return(0.0);
        end ssecurity;

	function union(gross_pay: Float) return float is
        begin
                return(0.0675 * gross_pay);
        end union;

	procedure net(gross_pay, federal_tax, social_security, union_dues: Float) is
		net_pay: Float;
	begin
		put("Net pay = $");
		net_pay := gross_pay - federal_tax - social_security - union_dues;
		put_line(net_pay, AFT=>2,EXP=>0);
	end net;

begin
	put("Enter employee name:  ");
	get_line(name, length);
	new_line;
	put("Enter hours worked: ");
	get(hours_worked);
	new_line;
	put("Enter hourly rate:  ");
	get(hourly_rate);
	new_line;
	put("Enter number of dependents:  ");
	get(dependents);
	new_line;
	put("Is the employee a Union member? (Y/N):  ");
	get(union_member);
	gross_pay := hours_worked * hourly_rate;
	new_line;
	new_line;
	put("************************************************");
	put("Payroll status for ");
	put(name(1..length));
	new_line;
	gross(hours_worked, hourly_rate, gross_pay);
	put("Gross pay = $");
	put(gross_pay,AFT=>2,EXP=>0);
	put("Federal tax = $");
	federal_tax := tax(gross_pay, dependents);
	put(federal_tax,AFT=>2,EXP=>0); new_line;
	put("Social Security = $");
	social_security := ssecurity(gross_pay);
	put(social_security,AFT=>2,EXP=>0); new_line;
	if union_member = 'Y' then
		put("Union dues = $");
		union_dues := union(gross_pay);
		put(union_dues, AFT=>2,EXP=>0); 
		new_line;
	elsif union_member = 'N' then
		put("No Union dues"); 
		new_line;
	end if;
	net(gross_pay, federal_tax, social_security, union_dues);
	new_line;
	new_line;
	put("************************************************");
end cherieprog2;	 

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

* Re: Help!
  1996-10-01  0:00 Help! Cheryl Earnest
  1996-10-01  0:00 ` Help! John Herro
@ 1996-10-01  0:00 ` Samuel Tardieu
  1996-10-01  0:00   ` Help! Larry Kilgallen
  1996-10-01  0:00   ` Help! Keith Thompson
  1 sibling, 2 replies; 48+ messages in thread
From: Samuel Tardieu @ 1996-10-01  0:00 UTC (permalink / raw)
  To: Cheryl Earnest


>>>>> "Cherie" == Cheryl Earnest <cherie@labyrinth.cftnet.com> writes:

Cherie> Can someone please help me with the attached program. I think
Cherie> that my problem has to do with the gross_pay variable.

Cherie> I just can't see what the problem is.  The Compilation error
Cherie> is "invalid paramater in call"

You need to add the line:

  use flt_io;

to make subprograms visible after the line which defines
flt_io. Another alternative is to use flt_io.put_line instead of
put_line.

  Sam
-- 
  Samuel Tardieu -- sam@ada.eu.org




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

* Re: Help!
  1996-10-01  0:00 ` Help! Samuel Tardieu
@ 1996-10-01  0:00   ` Larry Kilgallen
  1996-10-01  0:00   ` Help! Keith Thompson
  1 sibling, 0 replies; 48+ messages in thread
From: Larry Kilgallen @ 1996-10-01  0:00 UTC (permalink / raw)



In article <qw6afu7vuqk.fsf@gargantua.enst.fr>, Samuel Tardieu <sam@ada.eu.org> writes:
>>>>>> "Cherie" == Cheryl Earnest <cherie@labyrinth.cftnet.com> writes:
> 
> Cherie> Can someone please help me with the attached program. I think
> Cherie> that my problem has to do with the gross_pay variable.
> 
> Cherie> I just can't see what the problem is.  The Compilation error
> Cherie> is "invalid paramater in call"
> 
> You need to add the line:
> 
>   use flt_io;
> 
> to make subprograms visible after the line which defines
> flt_io. Another alternative is to use flt_io.put_line instead of
> put_line.

I did not plow through the original code, but if that is the answer
for this specific problem, then the general answer is to get a
compiler which issues better error messages.

Larry Kilgallen




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

* Re: Help!
  1996-10-01  0:00 ` Help! John Herro
@ 1996-10-02  0:00   ` Jean-Etienne Doucet
  1996-10-03  0:00     ` Help! John Herro
  0 siblings, 1 reply; 48+ messages in thread
From: Jean-Etienne Doucet @ 1996-10-02  0:00 UTC (permalink / raw)



In article foi@newsbf02.news.aol.com, johnherro@aol.com (John Herro) writes:

[[ snipped: good advices about the use clause and put_line not working
   with floating-point types...]]

|      That should fix everything.  When you run the program and type the
| number of dependents, don't forget that you're inputting a float.  E.g.,
| type "3.0", not "3".  I hope this helps.
| - John Herro
| Software Innovations Technology
| http://members.aol.com/AdaTutor
| ftp://members.aol.com/AdaTutor


About this last point, it depends on which compiler you're using: the remark is
true for Ada 83 compilers, but Ada 95 (and thus Gnat) allows to enter an
"integer" value when a floating-point is expected: see ARM (v6.0), annex A.10.9.
In this case, typing "3" is OK...


/      Jean-Etienne DOUCET   |       LAAS - CNRS          \
|         doucet@laas.fr     |   Toulouse   FRANCE        |
|----------------------------+----------------------------|
\    (sig en chantier,  comme la flute de Mozart...)      /






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

* Re: Help!
  1996-10-02  0:00   ` Help! Jean-Etienne Doucet
@ 1996-10-03  0:00     ` John Herro
  1996-10-03  0:00       ` Help! John Herro
  0 siblings, 1 reply; 48+ messages in thread
From: John Herro @ 1996-10-03  0:00 UTC (permalink / raw)



I wrote:
>> ... don't forget that you're inputting a float.
>> E.g., type "3.0", not "3".

doucet@ripolin.laas.fr (Jean-Etienne Doucet) added:
> The remark is true for Ada 83 compilers, but Ada 95
> (and thus Gnat) allows to enter an "integer" value
> when a floating-point is expected: ... In this case,
> typing "3" is OK.

     True.  But I assumed that the original poster was using Ada 83,
because he wrote "Text_IO" and did his own instantiations of Float_IO and
Integer_IO.  However, your point is well taken, and I probably should have
pointed that out in my post.
- John Herro
Software Innovations Technology
http://members.aol.com/AdaTutor
ftp://members.aol.com/AdaTutor
-----
The mathematical relationship between Christmas and Halloween:
31     =  25
  OCT       DEC




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

* Re: Help!
  1996-10-03  0:00     ` Help! John Herro
@ 1996-10-03  0:00       ` John Herro
  0 siblings, 0 replies; 48+ messages in thread
From: John Herro @ 1996-10-03  0:00 UTC (permalink / raw)



I wrote:
> ... I assumed that the original poster was using
> Ada 83, because he wrote "Text_IO" and did his
> own instantiations of Float_IO and Integer_IO.

Oops, sorry, Cherie!  I meant to say, "because SHE wrote "Text_IO" and did
HER own instantiations."  I should have bothered to go back and LOOK at
the original post when I wrote the above!

- John Herro
Software Innovations Technology
http://members.aol.com/AdaTutor
ftp://members.aol.com/AdaTutor




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

* HELP!!!
@ 1996-11-02  0:00 Aaron H
  0 siblings, 0 replies; 48+ messages in thread
From: Aaron H @ 1996-11-02  0:00 UTC (permalink / raw)



I was cruzing and found this web site. It needs everyones attention.
Please check it out.
HTTP://web4rb.com/hdhs/




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

* HELP!
@ 1997-03-16  0:00 Dominic Mailhot
  1997-03-17  0:00 ` HELP! Jon S Anthony
  1997-03-18  0:00 ` HELP! Robert Dewar
  0 siblings, 2 replies; 48+ messages in thread
From: Dominic Mailhot @ 1997-03-16  0:00 UTC (permalink / raw)



Hi everyone!  My problem is pretty simple...  I've installed the compiler GNAT 
3.07 for Ada95...  Everything is ok, but I don't have the listing of the 
library included with the compiler...  I, of course, need it...  Where can I 
find that listing, I mean the protoypes of the procedures...???

Thank you!

                                                            /'^'\
                                                           ( o o )
-------------------------------------------------------oOOO--(_)--OOOo------
"If the auto industry were like       |	Dominic Mailhot
the computer industry,a car would     | Dominic_Mailhot@uqtr.uquebec.ca
now cost $50, would get 1000 km/h,    | (819)691-4328
and at a random time would explode... | (819)379-8005
killing all passengers."              |			.oooO
                                      |                 (   )   Oooo.
---------------------------------------------------------\ (----(   )-------
                                                          \_)    ) /
                                                                (_/                   




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

* Re: HELP!
  1997-03-16  0:00 HELP! Dominic Mailhot
@ 1997-03-17  0:00 ` Jon S Anthony
  1997-03-18  0:00   ` HELP! Robert Dewar
  1997-03-18  0:00   ` HELP! Jon S Anthony
  1997-03-18  0:00 ` HELP! Robert Dewar
  1 sibling, 2 replies; 48+ messages in thread
From: Jon S Anthony @ 1997-03-17  0:00 UTC (permalink / raw)



In article <E75sJo.22u@UQuebec.CA> Dominic_Mailhot@uqtr.uquebec.ca (Dominic Mailhot) writes:

> Hi everyone!  My problem is pretty simple...  I've installed the
> compiler GNAT 3.07 for Ada95...  Everything is ok, but I don't have
> the listing of the library included with the compiler...  I, of
> course, need it...  Where can I find that listing, I mean the
> protoypes of the procedures...???

Easiest way to know where this is, is to look at what's in
ADA_INCLUDE_PATH.  It will have listed in it, the directory containing
the library stuff.

/Jon

-- 
Jon Anthony
Organon Motives, Inc.
Belmont, MA 02178
617.484.3383
jsa@organon.com





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

* Re: HELP!
  1997-03-17  0:00 ` HELP! Jon S Anthony
@ 1997-03-18  0:00   ` Robert Dewar
  1997-03-18  0:00   ` HELP! Jon S Anthony
  1 sibling, 0 replies; 48+ messages in thread
From: Robert Dewar @ 1997-03-18  0:00 UTC (permalink / raw)



Jon says

<<Easiest way to know where this is, is to look at what's in
ADA_INCLUDE_PATH.  It will have listed in it, the directory containing
the library stuff.>>

The trouble if you do this is that you will not know what is standard
Ada, and what are routines special to GNAT that are not part of the
language. Better to stick to the standard documentation sources (RM
and the GNAT manual. The one exception is that the GNAT hierarchy
contains routines that are definitely available for use (but are not
standard Ada).

Advising people to look in Ada_Include_Path is not helpful on many 
GNAT systems, because the library will not be in the path (on many
GNAT installations, following standard Unix practice, there is a default
directory for the standard library that is NOT explicitly in the path.





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

* Re: HELP!
  1997-03-16  0:00 HELP! Dominic Mailhot
  1997-03-17  0:00 ` HELP! Jon S Anthony
@ 1997-03-18  0:00 ` Robert Dewar
  1 sibling, 0 replies; 48+ messages in thread
From: Robert Dewar @ 1997-03-18  0:00 UTC (permalink / raw)



Dominic said

<<Hi everyone!  My problem is pretty simple...  I've installed the compiler GNAT
3.07 for Ada95...  Everything is ok, but I don't have the listing of the
library included with the compiler...  I, of course, need it...  Where can I
find that listing, I mean the protoypes of the procedures...???>>

You can find it in annex A of the Ada RM (go to www.adahome.com to find
a copy), or in any good Ada text book. The basic set of library routines
is part of the language.

GNAT provides some additional library routines that are documented in the
GNAT reference manual, which is part of the distribution.





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

* Re: HELP!
  1997-03-17  0:00 ` HELP! Jon S Anthony
  1997-03-18  0:00   ` HELP! Robert Dewar
@ 1997-03-18  0:00   ` Jon S Anthony
  1 sibling, 0 replies; 48+ messages in thread
From: Jon S Anthony @ 1997-03-18  0:00 UTC (permalink / raw)



In article <dewar.858685643@merv> dewar@merv.cs.nyu.edu (Robert Dewar) writes:

> Jon says
> 
> <<Easiest way to know where this is, is to look at what's in
> ADA_INCLUDE_PATH.  It will have listed in it, the directory containing
> the library stuff.>>
> 
> The trouble if you do this is that you will not know what is standard
> Ada, and what are routines special to GNAT that are not part of the
> language. Better to stick to the standard documentation sources (RM
> and the GNAT manual. The one exception is that the GNAT hierarchy
> contains routines that are definitely available for use (but are not
> standard Ada).

Good points, well taken.  I believed though that the poster wanted to
look at the sources (which may well be for legitimate reasons).


> Advising people to look in Ada_Include_Path is not helpful on many 
> GNAT systems, because the library will not be in the path (on many
> GNAT installations, following standard Unix practice, there is a default
> directory for the standard library that is NOT explicitly in the path.

Thanks for the correction.

/Jon
-- 
Jon Anthony
Organon Motives, Inc.
Belmont, MA 02178
617.484.3383
jsa@organon.com





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

* Help!!
@ 1997-04-28  0:00 UserID
  1997-04-29  0:00 ` Help!! Michael F Brenner
  0 siblings, 1 reply; 48+ messages in thread
From: UserID @ 1997-04-28  0:00 UTC (permalink / raw)



I'm currently doing Data Structures with Ada at Edith Cowan University,
in Australia and am looking for some help in writing an assignment.
the assignment has to do with stacks bounded and unbounded as wellas
counts arrays etc. if any one can helpl please let me know it would be
greatly appreciated.




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

* Re: Help!!
  1997-04-28  0:00 Help!! UserID
@ 1997-04-29  0:00 ` Michael F Brenner
  0 siblings, 0 replies; 48+ messages in thread
From: Michael F Brenner @ 1997-04-29  0:00 UTC (permalink / raw)



    > Unbounded versus bounded stacks. 

I think unbounded stacks are more useful and more fun to program. What
have you done so far?




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

* help!
@ 1997-05-24  0:00 oliver white
  0 siblings, 0 replies; 48+ messages in thread
From: oliver white @ 1997-05-24  0:00 UTC (permalink / raw)



I am a first year student at Edith Cowan university (Mt Lawley campus,
perth), studying for my B.Sc(software engineering) degree. Basicaly my
problem is with getting my ada compiler to work. I have downloaded
GNAT307 from a web site and have installed it as the readme file says.
The compiler is dos based, and I am using windows 95 (waiting for that
little bug everyone is telling me about to destroy months of hard work).
Anyway, the install program creates gnat307.bat which is supposed to set
it up. I run this and find "echo off" appearing at the dos prompt and
windows 95 telling me the thing is finished. Help me, I have an
assignment due on monday :( *sob*.

post a reply or email me at ojw@iinet.net.au. Thanks.
						Oli White




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

* HELP!!!!!!
@ 1997-06-10  0:00 Luke Holden
  0 siblings, 0 replies; 48+ messages in thread
From: Luke Holden @ 1997-06-10  0:00 UTC (permalink / raw)



HELP!!! I Desperately need Ada programmers. I am working on a project
called GMP (Geooss  Modification Program) The Geooss is a system to
track the millions of space debris in orbit around earth. NASA uses this
to figure out when to launch something into orbit and not have it hit
anything. One problem, The Government did such a bad job on this system
it desperately needs reprogramming and reorganization. I need as many
skilled Ada programmers as I can get. The Job requires you live in
Colorado Springs, or the Colorado area, or are willing to relocate to
the Colorado area. You would be working in Colorado Springs but your
location can be anywhere in the area <close enough to drive to each
day>. There are a few skills that will better your chances of being
hired, they are the folloring:

-      Ada - Required
- User Interface 
- MMI (Man-Machine interface)
- X11
- Motif
- Display Builder
- Data Base
- Sybase
- Performance Tuning
- Progress Management 
- UNAS 

It would be nice if you had a formal education but not required. The
Following would be nice to have:

- Computer Science
- Electrical Engineering
- Math 

For more information please contact Luke Holden at Luke@Holdens.org with
a resume intact. Or fax me at (719) 590-4129. Thank you very much




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

* Help?
@ 1999-11-21  0:00 Matthew Lawrence
  1999-11-21  0:00 ` Help? David C. Hoos, Sr.
                   ` (3 more replies)
  0 siblings, 4 replies; 48+ messages in thread
From: Matthew Lawrence @ 1999-11-21  0:00 UTC (permalink / raw)


Hello to all

I have a question that I'm sure will seem incredibly simple to most of you
but I'm a first semester computer science major and it is giving me some
trouble.

In one procedure I have stored a set of records in an array.  I need to in
another procedure access individual fields of those records.  I guess I have
two main questions.

1) Can I pass the entire array from the first procedure to the second?

2) How would I access individual fields of the records that are stored in
the array?

I've scoured my textbook for any help but must be looking in the wrong
places.

I would like to be more specific but prefer not to ask program specific
questions as it is an individual assignment.

Any help will be much appreciated

Matthew Lawrence






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

* Re: Help?
  1999-11-21  0:00 Help? Matthew Lawrence
@ 1999-11-21  0:00 ` David C. Hoos, Sr.
  1999-11-22  0:00 ` Help? Robert Dewar
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 48+ messages in thread
From: David C. Hoos, Sr. @ 1999-11-21  0:00 UTC (permalink / raw)



Matthew Lawrence <bandit@fidnet.com> wrote in message
news:38382bef.0@silver.truman.edu...
> Hello to all
>
> I have a question that I'm sure will seem incredibly simple to most of you
> but I'm a first semester computer science major and it is giving me some
> trouble.
>
> In one procedure I have stored a set of records in an array.  I need to in
> another procedure access individual fields of those records.  I guess I
have
> two main questions.
>
> 1) Can I pass the entire array from the first procedure to the second?
>
Yes.
> 2) How would I access individual fields of the records that are stored in
> the array?
>
> I've scoured my textbook for any help but must be looking in the wrong
> places.
>
<array-name> (<array-index>).<field-name>

> I would like to be more specific but prefer not to ask program specific
> questions as it is an individual assignment.
>
> Any help will be much appreciated
>
> Matthew Lawrence
>
>






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

* Re: Help?
  1999-11-21  0:00 Help? Matthew Lawrence
  1999-11-21  0:00 ` Help? David C. Hoos, Sr.
  1999-11-22  0:00 ` Help? Robert Dewar
@ 1999-11-22  0:00 ` John English
  1999-11-22  0:00 ` Help? Riyaz Mansoor
  3 siblings, 0 replies; 48+ messages in thread
From: John English @ 1999-11-22  0:00 UTC (permalink / raw)


Matthew Lawrence wrote:
> In one procedure I have stored a set of records in an array.  I need to in
> another procedure access individual fields of those records.  I guess I have
> two main questions.
> 
> 1) Can I pass the entire array from the first procedure to the second?

Yes.

> 2) How would I access individual fields of the records that are stored in
> the array?

if Arr is the array, Arr(I) is a single array element (i.e. a single
record), so Arr(I).Component is a component of that record.

-----------------------------------------------------------------
 John English              | mailto:je@brighton.ac.uk
 Senior Lecturer           | http://www.it.bton.ac.uk/staff/je
 Dept. of Computing        | ** NON-PROFIT CD FOR CS STUDENTS **
 University of Brighton    |    -- see http://burks.bton.ac.uk
-----------------------------------------------------------------




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

* Re: Help?
  1999-11-21  0:00 Help? Matthew Lawrence
  1999-11-21  0:00 ` Help? David C. Hoos, Sr.
@ 1999-11-22  0:00 ` Robert Dewar
  1999-11-22  0:00 ` Help? John English
  1999-11-22  0:00 ` Help? Riyaz Mansoor
  3 siblings, 0 replies; 48+ messages in thread
From: Robert Dewar @ 1999-11-22  0:00 UTC (permalink / raw)


In article <38382bef.0@silver.truman.edu>,
  "Matthew Lawrence" <bandit@fidnet.com> wrote:
> Hello to all
>
> I have a question that I'm sure will seem incredibly simple to
> most of you but I'm a first semester computer science major
> and it is giving me some trouble.
>
> 2) How would I access individual fields of the records that
>    are stored in the array?
>
> I've scoured my textbook for any help but must be looking in
> the wrong places.


Your real problem here is that you are probably reading the
text book at the wrong level of abstraction. You will not find
something specific in the text book that answers question 2)
above, but you WILL find

a) how to access elements of an array
b) how to access fields of a record

The point is to understand that the answer to your question
is simply a matter of comprehending that the answer to a) and
b) must be composed to provide the answer to 2).

E.g. in this case

a)   use the notation array_var (subscript)
b)   use the notation record_var.record_field

Answer to your question 2

  array_var (subscript).record_field

Think of it this way, suppose Ada has 100 features of this type.
What we want in the text book is a clear description of the 100
features. It is up to you to combine them. You can't expect to
find in your text book specific help for "how do I combine
features 2, 34 and 71". A text book that provided this kind of
coverage would have to have 2**100 sections, which is a large
number :-)

I find that this inability to abstract from documentation is
one of the most common failings. It is one of the reasons
why so many people come
to depend on examples, because the examples often show (in a
very limited manner) how to combine features.


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




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

* Re: Help?
  1999-11-21  0:00 Help? Matthew Lawrence
                   ` (2 preceding siblings ...)
  1999-11-22  0:00 ` Help? John English
@ 1999-11-22  0:00 ` Riyaz Mansoor
  3 siblings, 0 replies; 48+ messages in thread
From: Riyaz Mansoor @ 1999-11-22  0:00 UTC (permalink / raw)



assuming all these procedures are in the same package or the public part of
another package (not likely) you'll be able to directly access the fields in
the record. if not that particular package should have procedure/functions
to access the fields of the record.

in ada u can pass almost anything into a procedure/function.

since you've already got the array, all u have to do is loop thru it till u
get the matching record. the condition would be

    record(count).field = whatever_u're_checking

i hope that's ok

riyaz







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

* Help!!
@ 2000-03-24  0:00 Paul Moran
  2000-03-24  0:00 ` Help!! Pascal Obry
  0 siblings, 1 reply; 48+ messages in thread
From: Paul Moran @ 2000-03-24  0:00 UTC (permalink / raw)


Gday Ada Newsgroup,

My name is Paul,

I am studying Ada - Gnat95 at University. I have never programmed before....

I have this question for home work that I have little to no idea how to
do....

If you could please give me any help so that I can see exactly what you've
done it would be greatly appreciated! I imagine it is the type of question
that would take no more than 5-10 min's if you knew how to use Ada.....me, I
have been searching through my reader for hrs on end!!!

The reason I cant simply bring it into uni, is that I study externally, some
1500 klms from my campus!!

Hope you can help me as I am really getting frustrated with this subject
Thanks alot. If you cannot help, could you please recommend some one who
might be able to??

Thanks for your time and patience...

Paul

Heres the Question:

Write an Ada program for the Nordenham Booking System that calculates and
prints the price of a ticket to the Olympic games events:
            - Olympic Ceremony        abbreviated to OC
            - Women's 400m              abbreviated to CF
            - all other events              abbreviated to ETC
Each of these events has a different price:
            - OC  - $300.00
            - CF   - $450.00
            - ETC  - $155.50

The program should prompt for what type of destination is requested. It
should then read an appropriate enumerated literal indicating the desired
calculation, prompt for, and get, the number of tickets required and read an
integer value. It should than ask you for your name and read it. Finally the
result of the desired calculation should be displayed in a pleasing format
on the screen.
The program should echo print the data. The output data should be
appropriately labelled and formatted to two decimal places.






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

* Re: Help!!
  2000-03-24  0:00 Help!! Paul Moran
@ 2000-03-24  0:00 ` Pascal Obry
  0 siblings, 0 replies; 48+ messages in thread
From: Pascal Obry @ 2000-03-24  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1129 bytes --]


Paul,

>
> Heres the Question:
>

But this is not a "Question" it is your home work subjet !

A lot of peoples here on CLA will be please to help you and to
answer your questions but not to do your homework :)

You should try to do it yourself and ask specific questions about the
language or how to achieve this specific behavior or ...

Good luck,
Pascal.


--

--|------------------------------------------------------------
--| Pascal Obry                               Team-Ada Member |
--|                                                           |
--| EDF-DER-IPN-SID- T T I                                    |
--|                       Intranet: http://cln46gb            |
--| Bureau N-023            e-mail: p.obry@der.edf.fr         |
--| 1 Av G�n�ral de Gaulle  voice : +33-1-47.65.50.91         |
--| 92141 Clamart CEDEX     fax   : +33-1-47.65.50.07         |
--| FRANCE                                                    |
--|------------------------------------------------------------
--|
--|         http://perso.wanadoo.fr/pascal.obry
--|
--|   "The best way to travel is by means of imagination"







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

* HELP!!
@ 2000-08-31  0:00 Michele De Rosa
  2000-08-31 12:20 ` HELP!! Pascal Obry
  2000-08-31 12:23 ` HELP!! Ken Garlington
  0 siblings, 2 replies; 48+ messages in thread
From: Michele De Rosa @ 2000-08-31  0:00 UTC (permalink / raw)


If there's someone who have ada's manual, will be able send it at
megres@tiscalinet.it






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

* Re: HELP!!
  2000-08-31  0:00 HELP!! Michele De Rosa
@ 2000-08-31 12:20 ` Pascal Obry
  2000-08-31 12:23 ` HELP!! Ken Garlington
  1 sibling, 0 replies; 48+ messages in thread
From: Pascal Obry @ 2000-08-31 12:20 UTC (permalink / raw)



Electronic versions of the RM and Rationale can be found at:

http://www.adapower.com/

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--|
--| "The best way to travel is by means of imagination"



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

* Re: HELP!!
  2000-08-31  0:00 HELP!! Michele De Rosa
  2000-08-31 12:20 ` HELP!! Pascal Obry
@ 2000-08-31 12:23 ` Ken Garlington
  1 sibling, 0 replies; 48+ messages in thread
From: Ken Garlington @ 2000-08-31 12:23 UTC (permalink / raw)


http://www.adahome.com/rm95/

"Michele De Rosa" <megres@tiscalinet.it> wrote in message
news:bFpr5.17519$Wi7.249090@news.infostrada.it...
> If there's someone who have ada's manual, will be able send it at
> megres@tiscalinet.it
>
>





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

* HELP!!!!!!
@ 2001-10-17 14:34 F
  2001-10-17 16:10 ` HELP!!!!!! Chris M. Moore
  2001-10-17 17:31 ` HELP!!!!!! tmoran
  0 siblings, 2 replies; 48+ messages in thread
From: F @ 2001-10-17 14:34 UTC (permalink / raw)


I would like to make a program in wich a string is given in input and the
dimension of it is unknown (till someone insert it...)
HOW CAN I DO?????? (without using hundreds of lines)
Thank you!!!!!!!!!!
Just a consideration, string's manage in Ada is not so beutifull: i can
implement a server without problems but i cannot take a string in
input...........
Bye Phosphorus





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

* Re: HELP!!!!!!
  2001-10-17 14:34 HELP!!!!!! F
@ 2001-10-17 16:10 ` Chris M. Moore
  2001-10-17 18:17   ` HELP!!!!!! Jeffrey Carter
  2001-10-18  7:10   ` HELP!!!!!! F
  2001-10-17 17:31 ` HELP!!!!!! tmoran
  1 sibling, 2 replies; 48+ messages in thread
From: Chris M. Moore @ 2001-10-17 16:10 UTC (permalink / raw)


On Wed, 17 Oct 2001 16:34:03 +0200, "F" <phosphorus@libero.it> wrote:

>I would like to make a program in wich a string is given in input and the
>dimension of it is unknown (till someone insert it...)
>HOW CAN I DO?????? (without using hundreds of lines)

function Read_String_From_Keyboard return String is
  Temp_Str : Ada.Strings.Unbounded.Unbounded_String :=
    Ada.Strings.Unbounded.Null_Unbounded_String;
  Ch : Character;
begin
  while not Ada.Text_IO.End_Of_Line loop
    Ada.Text_IO.Get(Ch);
    Temp_Str := Ada.Strings.Unbounded."&"(Temp_Str, Ch);
  end loop;
  return Ada.Strings.Unbounded.To_String(Temp_Str);
end Read_String_From_Keyboard;

seems like the safest way.  I haven't tried compiling this though so
who knows!

--
Chris M. Moore
Software engineer
speaking for myself



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

* Re: HELP!!!!!!
  2001-10-17 14:34 HELP!!!!!! F
  2001-10-17 16:10 ` HELP!!!!!! Chris M. Moore
@ 2001-10-17 17:31 ` tmoran
  1 sibling, 0 replies; 48+ messages in thread
From: tmoran @ 2001-10-17 17:31 UTC (permalink / raw)


> I would like to make a program in wich a string is given in input and the
> dimension of it is unknown (till someone insert it...)
> HOW CAN I DO?????? (without using hundreds of lines)
  function Fetch_Message return String is
    -- Does one or more Get_Line's to return an arbitrarily large string.
    Message : String(1 .. 80); -- usually adequate
    Last    : Natural;
  begin
    Ada.Text_IO.Get_Line(Message, Last);
    if Last = Message'last then -- there's still more, fetch it
      return Message(Message'first .. Last) & Fetch_Message;
    end if;
    return Message(Message'first .. Last);
  end Fetch_Message;

> Just a consideration, string's manage in Ada is not so beutifull: i can
> implement a server without problems but i cannot take a string in
> input...........
  When you find something simple seems hard to do in Ada, you must be
missing something.  When you find something hard is hard to do, there's
probably a better way in Ada.



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

* Re: HELP!!!!!!
  2001-10-17 16:10 ` HELP!!!!!! Chris M. Moore
@ 2001-10-17 18:17   ` Jeffrey Carter
  2001-10-18  7:10   ` HELP!!!!!! F
  1 sibling, 0 replies; 48+ messages in thread
From: Jeffrey Carter @ 2001-10-17 18:17 UTC (permalink / raw)


"Chris M. Moore" wrote:
> 
> On Wed, 17 Oct 2001 16:34:03 +0200, "F" <phosphorus@libero.it> wrote:
> 
> >I would like to make a program in wich a string is given in input and the
> >dimension of it is unknown (till someone insert it...)
> >HOW CAN I DO?????? (without using hundreds of lines)
> 
> function Read_String_From_Keyboard return String is
>   Temp_Str : Ada.Strings.Unbounded.Unbounded_String :=
>     Ada.Strings.Unbounded.Null_Unbounded_String;
>   Ch : Character;
> begin
>   while not Ada.Text_IO.End_Of_Line loop
>     Ada.Text_IO.Get(Ch);
>     Temp_Str := Ada.Strings.Unbounded."&"(Temp_Str, Ch);
>   end loop;
>   return Ada.Strings.Unbounded.To_String(Temp_Str);
> end Read_String_From_Keyboard;
> 
> seems like the safest way.  I haven't tried compiling this though so
> who knows!

This seems like more work than is needed. PragmARC.Get_Line from the
PragmAda Reusable Components does this (and from other
Ada.Text_IO.File_Type files as well) without repeatedly modifying an
unbounded string.

-- 
Jeffrey Carter



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

* Re: HELP!!!!!!
  2001-10-17 16:10 ` HELP!!!!!! Chris M. Moore
  2001-10-17 18:17   ` HELP!!!!!! Jeffrey Carter
@ 2001-10-18  7:10   ` F
  2001-10-18  8:11     ` HELP!!!!!! Martin Dowie
  1 sibling, 1 reply; 48+ messages in thread
From: F @ 2001-10-18  7:10 UTC (permalink / raw)


My problem is the second time i recall the function read string, in fact the
value of the function end_of_line remains true after the first time in wich
the user press return.....
II'm trying to use the procedure get_line instead of  get, i'll give you
news about this "experiment"
Thank you for your help
Phosphorus

Chris M. Moore ha scritto nel messaggio
<3bcdaa4e.11615702@news.geccs.gecm.com>...
>On Wed, 17 Oct 2001 16:34:03 +0200, "F" <phosphorus@libero.it> wrote:
>
>>I would like to make a program in wich a string is given in input and the
>>dimension of it is unknown (till someone insert it...)
>>HOW CAN I DO?????? (without using hundreds of lines)
>
>function Read_String_From_Keyboard return String is
>  Temp_Str : Ada.Strings.Unbounded.Unbounded_String :=
>    Ada.Strings.Unbounded.Null_Unbounded_String;
>  Ch : Character;
>begin
>  while not Ada.Text_IO.End_Of_Line loop
>    Ada.Text_IO.Get(Ch);
>    Temp_Str := Ada.Strings.Unbounded."&"(Temp_Str, Ch);
>  end loop;
>  return Ada.Strings.Unbounded.To_String(Temp_Str);
>end Read_String_From_Keyboard;
>
>seems like the safest way.  I haven't tried compiling this though so
>who knows!
>
>--
>Chris M. Moore
>Software engineer
>speaking for myself





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

* Re: HELP!!!!!!
  2001-10-18  7:10   ` HELP!!!!!! F
@ 2001-10-18  8:11     ` Martin Dowie
  2001-10-18 16:57       ` HELP!!!!!! Jeffrey Carter
  0 siblings, 1 reply; 48+ messages in thread
From: Martin Dowie @ 2001-10-18  8:11 UTC (permalink / raw)


"F" <phosphorus@libero.it> wrote in message
news:9qlv2v$25md$1@newsreader1.mclink.it...
> My problem is the second time i recall the function read string, in fact
the
> value of the function end_of_line remains true after the first time in
wich
> the user press return.....
> II'm trying to use the procedure get_line instead of  get, i'll give you
> news about this "experiment"
> Thank you for your help

Have you tried flushing the keyboard buffer?





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

* Re: HELP!!!!!!
  2001-10-18  8:11     ` HELP!!!!!! Martin Dowie
@ 2001-10-18 16:57       ` Jeffrey Carter
  0 siblings, 0 replies; 48+ messages in thread
From: Jeffrey Carter @ 2001-10-18 16:57 UTC (permalink / raw)


Martin Dowie wrote:
> 
> "F" <phosphorus@libero.it> wrote in message
> news:9qlv2v$25md$1@newsreader1.mclink.it...
> > My problem is the second time i recall the function read string, in fact
> the
> > value of the function end_of_line remains true after the first time in
> wich
> > the user press return.....
> > II'm trying to use the procedure get_line instead of  get, i'll give you
> > news about this "experiment"
> > Thank you for your help
> 
> Have you tried flushing the keyboard buffer?

Calling Skip_Line might be better.

-- 
Jeffrey Carter



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

* Help!
@ 2003-02-24 11:44 Paul Gregory
  2003-02-24 13:07 ` Help! ( University of Brighton homework problem ) Larry Kilgallen
  2003-02-24 13:08 ` Help! Preben Randhol
  0 siblings, 2 replies; 48+ messages in thread
From: Paul Gregory @ 2003-02-24 11:44 UTC (permalink / raw)


I'm having a few problems with my school ADA project.

I have to write a program which translates 10 English words to French
but when it Translates a sentence it does it in upper case instead of a
capital letter for the first letter and lower case for the rest.

Any ideas how I could get round this ?

PG




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

* Re: Help! ( University of Brighton homework problem )
  2003-02-24 11:44 Help! Paul Gregory
@ 2003-02-24 13:07 ` Larry Kilgallen
  2003-02-24 13:08 ` Help! Preben Randhol
  1 sibling, 0 replies; 48+ messages in thread
From: Larry Kilgallen @ 2003-02-24 13:07 UTC (permalink / raw)


In article <3E5A05A2.3F1379EC@bton.ac.uk>, Paul Gregory <pg16@bton.ac.uk> writes:
> I'm having a few problems with my school ADA project.
> 
> I have to write a program which translates 10 English words to French
> but when it Translates a sentence it does it in upper case instead of a
> capital letter for the first letter and lower case for the rest.
> 
> Any ideas how I could get round this ?

If I were doing it, I would make a separate phase to apply the
capitalization rules for the output language.  You might want
to do the same thing for punctuation, since if you later change
the program to have the output language be Spanish, I think the
punctuation rules are different for questions.



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

* Re: Help!
  2003-02-24 11:44 Help! Paul Gregory
  2003-02-24 13:07 ` Help! ( University of Brighton homework problem ) Larry Kilgallen
@ 2003-02-24 13:08 ` Preben Randhol
  2003-02-24 13:10   ` Help! Preben Randhol
  1 sibling, 1 reply; 48+ messages in thread
From: Preben Randhol @ 2003-02-24 13:08 UTC (permalink / raw)


Paul Gregory wrote:
> I'm having a few problems with my school ADA project.
> 
> I have to write a program which translates 10 English words to French
> but when it Translates a sentence it does it in upper case instead of a
> capital letter for the first letter and lower case for the rest.
> 
> Any ideas how I could get round this ?

Is this the assignment or is it only a part of it?

with Ada.Characters.Handling;
use Ada.Characters.Handling;

To_Lower (Your_String (Your_String'First + 1 .. Your_String'Last);

-- 
Preben Randhol ---------------- http://www.pvv.org/~randhol/ --
"Violence is the last refuge of the incompetent", Isaac Asimov



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

* Re: Help!
  2003-02-24 13:08 ` Help! Preben Randhol
@ 2003-02-24 13:10   ` Preben Randhol
  0 siblings, 0 replies; 48+ messages in thread
From: Preben Randhol @ 2003-02-24 13:10 UTC (permalink / raw)


Preben Randhol wrote:
> with Ada.Characters.Handling;
> use Ada.Characters.Handling;
> 
> To_Lower (Your_String (Your_String'First + 1 .. Your_String'Last);

Oops

 To_Lower (Your_String (Your_String'First + 1 .. Your_String'Last));

-- 
Preben Randhol ---------------- http://www.pvv.org/~randhol/ --
"Violence is the last refuge of the incompetent", Isaac Asimov



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

end of thread, other threads:[~2003-02-24 13:10 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-24 11:44 Help! Paul Gregory
2003-02-24 13:07 ` Help! ( University of Brighton homework problem ) Larry Kilgallen
2003-02-24 13:08 ` Help! Preben Randhol
2003-02-24 13:10   ` Help! Preben Randhol
  -- strict thread matches above, loose matches on Subject: below --
2001-10-17 14:34 HELP!!!!!! F
2001-10-17 16:10 ` HELP!!!!!! Chris M. Moore
2001-10-17 18:17   ` HELP!!!!!! Jeffrey Carter
2001-10-18  7:10   ` HELP!!!!!! F
2001-10-18  8:11     ` HELP!!!!!! Martin Dowie
2001-10-18 16:57       ` HELP!!!!!! Jeffrey Carter
2001-10-17 17:31 ` HELP!!!!!! tmoran
2000-08-31  0:00 HELP!! Michele De Rosa
2000-08-31 12:20 ` HELP!! Pascal Obry
2000-08-31 12:23 ` HELP!! Ken Garlington
2000-03-24  0:00 Help!! Paul Moran
2000-03-24  0:00 ` Help!! Pascal Obry
1999-11-21  0:00 Help? Matthew Lawrence
1999-11-21  0:00 ` Help? David C. Hoos, Sr.
1999-11-22  0:00 ` Help? Robert Dewar
1999-11-22  0:00 ` Help? John English
1999-11-22  0:00 ` Help? Riyaz Mansoor
1997-06-10  0:00 HELP!!!!!! Luke Holden
1997-05-24  0:00 help! oliver white
1997-04-28  0:00 Help!! UserID
1997-04-29  0:00 ` Help!! Michael F Brenner
1997-03-16  0:00 HELP! Dominic Mailhot
1997-03-17  0:00 ` HELP! Jon S Anthony
1997-03-18  0:00   ` HELP! Robert Dewar
1997-03-18  0:00   ` HELP! Jon S Anthony
1997-03-18  0:00 ` HELP! Robert Dewar
1996-11-02  0:00 HELP!!! Aaron H
1996-10-01  0:00 Help! Cheryl Earnest
1996-10-01  0:00 ` Help! John Herro
1996-10-02  0:00   ` Help! Jean-Etienne Doucet
1996-10-03  0:00     ` Help! John Herro
1996-10-03  0:00       ` Help! John Herro
1996-10-01  0:00 ` Help! Samuel Tardieu
1996-10-01  0:00   ` Help! Larry Kilgallen
1996-10-01  0:00   ` Help! Keith Thompson
1996-03-27  0:00 HELP!!! ~ AnTY ~
1990-09-23 13:52 Help! Ken McCook;SCDQ;
1990-09-25 16:23 ` Help! Michael Feldman
1990-09-26 16:27 ` Help! Andy DeFaria
1990-09-26 19:26 ` Help! Andy DeFaria
1990-08-31 20:21 HELP! "Thomas H. Stripe  255-4472", 513
1990-09-05 16:27 ` HELP! Edward Falis
1990-07-07  7:23 Help !!!! 1LENDL
1990-01-24  1:26 Help! Rowan D. Stevens

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