comp.lang.ada
 help / color / mirror / Atom feed
* Help
@ 1990-08-01 18:19 Kenneth Anderson
  0 siblings, 0 replies; 21+ messages in thread
From: Kenneth Anderson @ 1990-08-01 18:19 UTC (permalink / raw)


I'm not sure if this is the place to post compiler questions but I need some
help. I am developing an Ada project using the Verdix 5.41 compiler. I have
encountered an utterly mystifing compiler error. I had decided to reuse a
software package that I had written before for another project. I moved the
two files (package spec and package body) into my current project's directory
and compiled them. The two files compiled just fine. I then added a with
statement to one of my other packages so that I could reference the new package.
I compiled that one, and it compiled fine. But then I ran into my problem when
I ran a.make to generate a new executable and received this message.

/usr.MC68020/vads5/vads.5.41/bin/a.ld -o pgraphite.exe pgraphite
Undefined:
_exit
_getpid
_mktemp
_stat
_getwd
_unlink
_ftruncate
_close
_open
_errno
_write
_sleep
_read
_lseek
_isatty
_fstat
_gettimeofday
_localtime
_free
_malloc
_sigvec
_sigblock
_sigsetmask

These look like C functions to me!!!!! The package that I added does not
reference any of these functions, so I have no idea how they became
undefined.

Has anyone encountered this problem before?

Please mail responses to kanderso@ics.uci.edu

Thanks in advance,

Ken Anderson

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

* Help...
@ 1993-03-12 22:28 Basavaraj B Patil
  0 siblings, 0 replies; 21+ messages in thread
From: Basavaraj B Patil @ 1993-03-12 22:28 UTC (permalink / raw)


Newsgroups: comp.lang.ada
Subject: Quest for Editor
Summary: 
Followup-To: 
Distribution: world
Organization: Computer Science Engineering at the University of Texas at Arlington
Keywords: 


Hi,
   I am currently developing a tool for simplifying latex for
beginers. The tool is being built in Ada and I have the task of
writing an editor. Although I have come up with a working module it
does have a few problems. I was wondering if any example code existed
that I could probably use. Also is there a ftp site containing ada
source code for such things. 
Any help in this regard would be appreciated.

You can either post on this newsgroup or send me mail at :
patil@cse.uta.edu

Thanx

:) Basavaraj "Raj" Patil


-- 







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

* HELP
@ 1994-10-14  3:33 Chiu Bo (Hung Chiu Hung)
  1994-10-14 13:21 ` HELP Robert Dewar
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: Chiu Bo (Hung Chiu Hung) @ 1994-10-14  3:33 UTC (permalink / raw)


Could any body tell me how to detect keyboard input without waiting for
the carrier return.

thanx...





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

* Re: HELP
  1994-10-14  3:33 HELP Chiu Bo (Hung Chiu Hung)
@ 1994-10-14 13:21 ` Robert Dewar
  1994-10-15 14:56   ` HELP Bob Duff
  1994-10-16  5:11   ` HELP Chiu Bo (Hung Chiu Hung)
  1994-10-14 19:36 ` HELP riehler
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 21+ messages in thread
From: Robert Dewar @ 1994-10-14 13:21 UTC (permalink / raw)


Time for another reminder. It is useless to ask questions about features
like this that are implementation dependent unless you tell us what
compiler you are using, what version, what operating system, what
machine etc.





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

* Re: HELP
  1994-10-14  3:33 HELP Chiu Bo (Hung Chiu Hung)
  1994-10-14 13:21 ` HELP Robert Dewar
@ 1994-10-14 19:36 ` riehler
  1994-10-14 19:36 ` HELP Richard Riehle
  1994-10-19  3:10 ` HELP Michael M. Bishop
  3 siblings, 0 replies; 21+ messages in thread
From: riehler @ 1994-10-14 19:36 UTC (permalink / raw)


In article <Cxn8J2.HxJ@eng_ser1.erg.cuhk.hk> chhung2@cuse1.se.cuhk.hk (Chiu Bo (Hung Chiu Hung)) writes:
>Could any body tell me how to detect keyboard input without waiting for
>the carrier return.
>
>thanx...
>
>
Good Question.  The answer varies by operating system.  If you need to do
this, write a package specification to abstract the operations away
from the compiler and the operating system.

      package KeyBoard_Handler is
      
          function KeyBoard_Ready return Boolean;

          -- other operations

   
      end KeyBoard_Handler;

In MS-DOS, you will find there are several interrupts you can trap to
determine keyboard status.  If you pragma interface to assembler, you
can use Interupt 33 (hex 21), Function 11 (hex B) to implement this.

An easier approach is to use the DOS Environments provided by the compiler
vendors.  Janus (the underlying  compiler for InegrAda), Meridian, and
Alsys, all have DOS Environments.  One approach is to use the Interrupt
Handling package.  This is overly difficult for most new programmers.

Consider:

       Meridian:   package TTY

            function Char_Ready return Boolean;
              (INT 16H, Function 01H)

       Alsys:    package DOS

            function KBD_Data_Available return Boolean;

       Janus:    package (varies by compiler)

            function Keypress return Boolean;


I find this is one of the useful places to use an Ada task under MS-DOS.
You can design a select statement to trap keyboard input as an external
"event", buffer the characters with another task, and keep the rest of
your system rolling along without a burp.

It also works well in commandf and control systems where one needs to keep
the display functioning with constant updates while receiving data from
the keyboard. 

There are UNIX solutions to this, as well, but they also vary by compiler.

This would have been a good function to include in Ada 9X Text_IO, but
it's too late now.  The good news is that your Keyboard_Handler can be
child of Ada.Text_IO.  IN fact, Janus has done just that with an Extensions
package:

         Ada.Text_IO.Extensions.Keypress ...

I have a rather long example of this I can send to anyone who wants to see
how it works, but it is too long to post.

(Hung Xiansheng, dong bu dong?)



Richard Riehle
AdaWorks Software Engineering
Suite 27
2555 Park Boulevard
Palo Alto, CA  94306
(415) 328-1815   FAX  328-1112

email: adaworks@netcom.com







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

* Re: HELP
  1994-10-14  3:33 HELP Chiu Bo (Hung Chiu Hung)
  1994-10-14 13:21 ` HELP Robert Dewar
  1994-10-14 19:36 ` HELP riehler
@ 1994-10-14 19:36 ` Richard Riehle
  1994-10-19  3:10 ` HELP Michael M. Bishop
  3 siblings, 0 replies; 21+ messages in thread
From: Richard Riehle @ 1994-10-14 19:36 UTC (permalink / raw)


In article <Cxn8J2.HxJ@eng_ser1.erg.cuhk.hk> chhung2@cuse1.se.cuhk.hk (Chiu Bo (Hung Chiu Hung)) writes:
>Could any body tell me how to detect keyboard input without waiting for
>the carrier return.
>
>thanx...
>
>
Good Question.  The answer varies by operating system.  If you need to do
this, write a package specification to abstract the operations away
from the compiler and the operating system.

      package KeyBoard_Handler is
      
          function KeyBoard_Ready return Boolean;

          -- other operations

   
      end KeyBoard_Handler;

In MS-DOS, you will find there are several interrupts you can trap to
determine keyboard status.  If you pragma interface to assembler, you
can use Interupt 33 (hex 21), Function 11 (hex B) to implement this.

An easier approach is to use the DOS Environments provided by the compiler
vendors.  Janus (the underlying  compiler for InegrAda), Meridian, and
Alsys, all have DOS Environments.  One approach is to use the Interrupt
Handling package.  This is overly difficult for most new programmers.

Consider:

       Meridian:   package TTY

            function Char_Ready return Boolean;
              (INT 16H, Function 01H)

       Alsys:    package DOS

            function KBD_Data_Available return Boolean;

       Janus:    package (varies by compiler)

            function Keypress return Boolean;


I find this is one of the useful places to use an Ada task under MS-DOS.
You can design a select statement to trap keyboard input as an external
"event", buffer the characters with another task, and keep the rest of
your system rolling along without a burp.

It also works well in commandf and control systems where one needs to keep
the display functioning with constant updates while receiving data from
the keyboard. 

There are UNIX solutions to this, as well, but they also vary by compiler.

This would have been a good function to include in Ada 9X Text_IO, but
it's too late now.  The good news is that your Keyboard_Handler can be
child of Ada.Text_IO.  IN fact, Janus has done just that with an Extensions
package:

         Ada.Text_IO.Extensions.Keypress ...

I have a rather long example of this I can send to anyone who wants to see
how it works, but it is too long to post.

(Hung Xiansheng, dong bu dong?)



Richard Riehle
AdaWorks Software Engineering
Suite 27
2555 Park Boulevard
Palo Alto, CA  94306
(415) 328-1815   FAX  328-1112

email: adaworks@netcom.com







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

* Re: HELP
  1994-10-14 13:21 ` HELP Robert Dewar
@ 1994-10-15 14:56   ` Bob Duff
  1994-10-18 16:31     ` HELP Robert Dewar
  1994-10-16  5:11   ` HELP Chiu Bo (Hung Chiu Hung)
  1 sibling, 1 reply; 21+ messages in thread
From: Bob Duff @ 1994-10-15 14:56 UTC (permalink / raw)


In article <37m0k6$pb8@gnat.cs.nyu.edu>, Robert Dewar <dewar@cs.nyu.edu> wrote:
>Time for another reminder. It is useless to ask questions about features
>like this that are implementation dependent unless you tell us what
>compiler you are using, what version, what operating system, what
>machine etc.

The question was:

In article <Cxn8J2.HxJ@eng_ser1.erg.cuhk.hk> chhung2@cuse1.se.cuhk.hk (Chiu Bo (Hung Chiu Hung)) writes:
>Could any body tell me how to detect keyboard input without waiting for
>the carrier return.

Robert,

Grr.  The above is a perfectly reasonable question.  There's no need to
try to make this person feel like a fool for not knowing that there's no
standard way to do it.  In fact there *should* be a standard way to do
it, and there *is* such a way in Ada 9X.

Sorry for the flame, but you've taken this tone before, expecting people
to know exactly what is part of the language and what is part of the
operating system.

;-)

In Ada 83, the answer is, "It depends on the compiler and operating
system."  In Ada 94, the answer is to use Get_Immediate, which is
documented in RM9X-A.10.7 (version 5.0).

- Bob
-- 
Bob Duff                                bobduff@inmet.com
Oak Tree Software, Inc.
Ada 9X Mapping/Revision Team (Intermetrics, Inc.)



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

* Re: HELP
  1994-10-14 13:21 ` HELP Robert Dewar
  1994-10-15 14:56   ` HELP Bob Duff
@ 1994-10-16  5:11   ` Chiu Bo (Hung Chiu Hung)
  1 sibling, 0 replies; 21+ messages in thread
From: Chiu Bo (Hung Chiu Hung) @ 1994-10-16  5:11 UTC (permalink / raw)


dewar@cs.nyu.edu (Robert Dewar) writes:

>Time for another reminder. It is useless to ask questions about features
>like this that are implementation dependent unless you tell us what
>compiler you are using, what version, what operating system, what
>machine etc.

I am using DEC ada and I think it is Ada 83 compiler.




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

* Re: HELP
  1994-10-15 14:56   ` HELP Bob Duff
@ 1994-10-18 16:31     ` Robert Dewar
  0 siblings, 0 replies; 21+ messages in thread
From: Robert Dewar @ 1994-10-18 16:31 UTC (permalink / raw)


OK< sorry if I was over-harsh, but it is ALWAYS helpful if people asking
the question "how do I do this in Ada?" include information on the host
envrionment and target environment. The FAQ for this group could usefully
make that clear. It saves a lot of unnecessary iterations.

Even in the case of things that ARE in the language, there are implementation
dependencies that make it helpful to *always* have this information at hand
if people want the most effective help.




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

* Re: HELP
  1994-10-14  3:33 HELP Chiu Bo (Hung Chiu Hung)
                   ` (2 preceding siblings ...)
  1994-10-14 19:36 ` HELP Richard Riehle
@ 1994-10-19  3:10 ` Michael M. Bishop
  3 siblings, 0 replies; 21+ messages in thread
From: Michael M. Bishop @ 1994-10-19  3:10 UTC (permalink / raw)


In article <Cxn8J2.HxJ@eng_ser1.erg.cuhk.hk>,
Chiu Bo (Hung Chiu Hung) <chhung2@cuse1.se.cuhk.hk> wrote:
>Could any body tell me how to detect keyboard input without waiting for
>the carrier return.
>
>thanx...
>
You probably need a low-level I/O package for this. Hopefully, this
package was provided by your compiler vendor. If not, you may need to
develop a bindings package for the I/O package on your system. For
example, I developed some software to process keyboard input in the way
that you mentioned and the compiler vendor, Verdix, provided a bindings
package to curses, which is the Unix package (written in C) that handles
such things.

-- 
| Mike Bishop              | The opinions expressed here reflect    |
| bishopm@source.asset.com | those of this station, its management, |
| Member: Team Ada         | and the entire world.                  |



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

* Re: HELP
@ 1994-10-19 16:26 CONDIC
  0 siblings, 0 replies; 21+ messages in thread
From: CONDIC @ 1994-10-19 16:26 UTC (permalink / raw)


From: Marin David Condic, 407.796.8997, M/S 731-93
Subject: Re: Re: HELP
Original_To:  PROFS%"SMTP@PWAGPDB"
Original_cc:  CONDIC



>dewar@cs.nyu.edu (Robert Dewar) writes:
>
>>Time for another reminder. It is useless to ask questions about features
>>like this that are implementation dependent unless you tell us what
>>compiler you are using, what version, what operating system, what
>>machine etc.
>
>I am using DEC ada and I think it is Ada 83 compiler.
>
I believe that the original question was how to read a single
character input from the keyboard. Given that you're using DEC
Ada83, I can tell you how we have dealt with it. One method is to
rely on the DEC OS calls in the SMG library. (This involves more
than a simple call, since you first have to set up a sort of
pseudo-windowing environment that tries to make a VT terminal
behave more like Motif!) Anyway, the relavent call can be
interfaced with as follows:

===============================================================================
=

-------------------------------------------------------------------------------
    --  Read a Single Character
    --
    --  SMG$READ_KEYSTROKE status, keyboard_id, word_terminator_code
    --          [,prompt_string] [,timeout] [,display_id], [,rendition_set]
    --          [,rendition_compliment]
    --
    --  status          = Return status of call
    --  keyboard_id     = id of the virtual keyboard you are reading from
    --  prompt_string   = string used for prompt
    --  timeout         = if specified, any character typed before time_out
    --                    is returned in the buffer
    --  display_id      = id of the virtural display
    --  rendition_set   = video attributes for text
    --  rendition_compliment    = video attributes for text
    --

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

    procedure SMG_READ_KEYSTROKE (
        STATUS                  : out CONDITION_HANDLING.COND_VALUE_TYPE;
        KEYBOARD_ID             : in KEYBOARD_TYPE;
        WORD_TERMINATOR_CODE    : out UNSIGNED_WORD;
        PROMPT_STRING           : in STRING := STRING'NULL_PARAMETER;
        TIMEOUT                 : in INTEGER := INTEGER'NULL_PARAMETER;
        DISPLAY_ID              : in DISPLAY_TYPE :=
DISPLAY_TYPE'NULL_PARAMETER;
        RENDITION_SET           : in SYSTEM.UNSIGNED_LONGWORD :=
SYSTEM.UNSIGNED_LONGWORD'NULL_PARAMETER;
        RENDITION_COMPLIMENT    : in SYSTEM.UNSIGNED_LONGWORD :=
SYSTEM.UNSIGNED_LONGWORD'NULL_PARAMETER

    pragma INTERFACE (VAXRTL, SMG_READ_KEYSTROKE);
    pragma IMPORT_VALUED_PROCEDURE (
        INTERNAL => SMG_READ_KEYSTROKE,
        EXTERNAL => "SMG$READ_KEYSTROKE",
        PARAMETER_TYPES => (COND_VALUE_TYPE, UNSIGNED_LONGWORD,
                            UNSIGNED_WORD, STRING, INTEGER,
                            UNSIGNED_LONGWORD, UNSIGNED_LONGWORD,
                            UNSIGNED_LONGWORD),
        MECHANISM => (VALUE, REFERENCE, REFERENCE, DESCRIPTOR,
                      REFERENCE, REFERENCE, REFERENCE, REFERENCE));

===============================================================================

I believe this call is duplicated in a package DEC provides
called "SMG" (appropriately enough!) Do an ACS command as follows

ACS> EXTRACT SOURCE/SPEC SMG

An alternate technique which only works moderately well, but does
provide for asynchronous keyboard/terminal behavior is to connect
an asynchronous system trap (AST) to a task entry and tie the AST
to the appropriate low level QIO routines. We've done this around
here and found that it can't always respond fast enough - but
it's still useful. How to do this is sufficiently complex that
I'd probably never give you a satisfying answer herin. Check the
VAX/VMS manuals on AST's and QIO's to understand how they work,
then check the DEC Ada manual to see how to connect an AST to a
task entry.

Pax Vobiscum,
Marin



Marin David Condic, Senior Computer Engineer    ATT:        407.796.8997
M/S 731-93                                      Technet:    796.8997
Pratt & Whitney, GESP                           Internet:   CONDICMA@PWFL.COM
P.O. Box 109600                                 Internet:   MDCONDIC@AOL.COM
West Palm Beach, FL 33410-9600
===============================================================================
    Glendower: "I can call spirits from the vasty deep."
    Hotspur: "Why so can I, or so can any man; but will they come when
    you do call for them?"

        -- Shakespeare, "Henry IV"
===============================================================================



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

* Re: Help
  1996-11-15  0:00 Help Alexander B. Schmidt
@ 1996-11-15  0:00 ` Michael Paus
  1996-11-18  0:00 ` Help Norman H. Cohen
  1996-11-19  0:00 ` Help Matthew Heaney
  2 siblings, 0 replies; 21+ messages in thread
From: Michael Paus @ 1996-11-15  0:00 UTC (permalink / raw)



"Alexander B. Schmidt" <schmiale@informatik.tu-muenchen.de> wrote:
> Hi,
> 
> does anybody know how to declare a string of variable length in Ada 
> 83? Declaring a variable of type String like
> str: STRING(1..20);
> and assigning a string like
> str := "a String" 
> results in a constraint error if the length of the string is not equal 
> to 20.
> Is it possible to declare strings with a maximum length which accept 
> the assignment of shorter strings too?

Well, there is nothing like a variable length string in Ada 83 directly.
A string is an array of characters and it does not make much sense to
assign arrays of different sizes to each other. To solve this problem
you can use one of the available string handling packages, or you could
switch from Ada 83 to Ada 95 and use the standard package
Ada.Strings.Unbounded.

(Look at http://www.adahome.com/ to see what is all available for Ada)

Michael

-- 
------------------------------------------------------------------------
--Dipl.-Ing. Michael Paus   (Member: Team Ada)
--University of Stuttgart, Inst. of Flight Mechanics and Flight Control
--Forststrasse 86, 70176 Stuttgart, Germany
--Phone: (+49) 711-121-1434  FAX: (+49) 711-634856
--Email: Michael.Paus@ifr.luftfahrt.uni-stuttgart.de (NeXT-Mail welcome)





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

* Help
@ 1996-11-15  0:00 Alexander B. Schmidt
  1996-11-15  0:00 ` Help Michael Paus
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Alexander B. Schmidt @ 1996-11-15  0:00 UTC (permalink / raw)



Hi,

does anybody know how to declare a string of variable length in Ada 
83? Declaring a variable of type String like
str: STRING(1..20);
and assigning a string like
str := "a String" 
results in a constraint error if the length of the string is not equal 
to 20.
Is it possible to declare strings with a maximum length which accept 
the assignment of shorter strings too?

Thanx
Alex




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

* Re: Help
  1996-11-15  0:00 Help Alexander B. Schmidt
  1996-11-15  0:00 ` Help Michael Paus
@ 1996-11-18  0:00 ` Norman H. Cohen
  1996-11-19  0:00 ` Help Matthew Heaney
  2 siblings, 0 replies; 21+ messages in thread
From: Norman H. Cohen @ 1996-11-18  0:00 UTC (permalink / raw)



Alexander B. Schmidt wrote:

> does anybody know how to declare a string of variable length in Ada
> 83? Declaring a variable of type String like
> str: STRING(1..20);
> and assigning a string like
> str := "a String"
> results in a constraint error if the length of the string is not equal
> to 20.
> Is it possible to declare strings with a maximum length which accept
> the assignment of shorter strings too?

Ada 95 directly supports the notion of a variable length string, but Ada
83 does not.  In either version of Ada, an object of type String (such
as str in your example) has bounds that are determined once and for all
at the time the object is created.  

The usual Ada-83 solution is to use an access type pointing to objects
of type String.  An object belonging to the access type can point to
different-length string objects at different times:

   type String_Pointer_Type is access String;
   Str_Ptr: String_Pointer_Type;
   ...
   Str_Ptr := new String'("Short string");
   Str_Ptr := new String'("A longer string");

-- 
Norman H. Cohen
mailto:ncohen@watson.ibm.com
http://www.research.ibm.com/people/n/ncohen




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

* Re: Help
  1996-11-15  0:00 Help Alexander B. Schmidt
  1996-11-15  0:00 ` Help Michael Paus
  1996-11-18  0:00 ` Help Norman H. Cohen
@ 1996-11-19  0:00 ` Matthew Heaney
  2 siblings, 0 replies; 21+ messages in thread
From: Matthew Heaney @ 1996-11-19  0:00 UTC (permalink / raw)



In article <328C2BF5.1348@informatik.tu-muenchen.de>, "Alexander B.
Schmidt" <schmiale@informatik.tu-muenchen.de> wrote:

>Hi,
>
>does anybody know how to declare a string of variable length in Ada 
>83? Declaring a variable of type String like
>str: STRING(1..20);
>and assigning a string like
>str := "a String" 
>results in a constraint error if the length of the string is not equal 
>to 20.
>Is it possible to declare strings with a maximum length which accept 
>the assignment of shorter strings too?

The technique I often use in Ada 83 is to use a discriminated record, as
follows:

subtype String_Buffer_Length_Range is Natural range 0 .. 20;

type String_Buffer (Length : String_Buffer_Length_Range := 0) is
   record
      Text : String (1 .. Length);
   end record;

function "+" (Text : String) return String_Buffer is
   subtype Slided is String (1 .. Text'Length);
begin
   return (Text'Length, Slided (Text));
end;

Now, given those definitions, I can do this:

declare
   The_String : String_Buffer;
begin
   The_String := +"Robert Dewar";
   The_String := +"Norm";
   The_String := +"Ada";
  
When you refer to the string, you don't need to apply an index constraint, ie

   Put_Line (The_String.Text); 
   -- The_String.Length worth of characters, not 20

This is also how to make a ragged array in Ada 83; just declare an array of
String_Buffer.

M.

--------------------------------------------------------------------
Matthew Heaney
Software Development Consultant
mheaney@ni.net
(818) 985-1271




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

* Help
@ 1997-02-27  0:00 Desperate
  1997-03-04  0:00 ` Help Jim Dorman
  0 siblings, 1 reply; 21+ messages in thread
From: Desperate @ 1997-02-27  0:00 UTC (permalink / raw)



Would someone post the pastran convertor or swap me theirs. I'll trade
ya for a ada textbook. We'll Call it 95 since it's 1997 and 97-2 =
something significant to the software industry. Thanx




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

* Re: Help
  1997-02-27  0:00 Help Desperate
@ 1997-03-04  0:00 ` Jim Dorman
  0 siblings, 0 replies; 21+ messages in thread
From: Jim Dorman @ 1997-03-04  0:00 UTC (permalink / raw)



If you are looking for a Pascal to Ada converter you might try visiting the
RR Software WEB Site at: "http://www.rrsoftware.com".  They have such an
animal for PC's.


Desperate <dumber@adasux.edu> wrote in article
<33165F4F.706D@adasux.edu>...
> Would someone post the pastran convertor or swap me theirs. I'll trade
> ya for a ada textbook. We'll Call it 95 since it's 1997 and 97-2 =
> something significant to the software industry. Thanx
> 




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

* help
@ 1998-12-07  0:00 Salvador
  1998-12-07  0:00 ` help dennison
  0 siblings, 1 reply; 21+ messages in thread
From: Salvador @ 1998-12-07  0:00 UTC (permalink / raw)


I'm a beginner in this and I mus know how I have to do for compiling a
program with separates (with subproblems). A few days ago I tried to compile
a program for countin the number of words that apears in a sentence, first I
compiled the main program, then I compiled the subprograms, after this I
built the main program and then I runned it. The black screen apears, I
write the sentence ended by a period, but there's no answer, please, what I
have to do?

tricia@mx3.redestb.es






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

* Re: help
  1998-12-07  0:00 help Salvador
@ 1998-12-07  0:00 ` dennison
  0 siblings, 0 replies; 21+ messages in thread
From: dennison @ 1998-12-07  0:00 UTC (permalink / raw)


In article <74gj9a$c9n@wendy.mad.servicom.es>,
  "Salvador" <tricia@mx3.redestb.es> wrote:
> I'm a beginner in this and I mus know how I have to do for compiling a
> program with separates (with subproblems). A few days ago I tried to compile

I assume you are talking about separate subprograms.


> a program for countin the number of words that apears in a sentence, first I
> compiled the main program, then I compiled the subprograms, after this I
> built the main program and then I runned it. The black screen apears, I
> write the sentence ended by a period, but there's no answer, please, what I
> have to do?

If you compiled and linked without error, then the problem probably has
nothing to do with separates. That being the case, you really haven't given
any information for us to work with. I'm guessing you probably got an
exception. But "The black screen" means nothing to anyone if we don't know
what compiler you are using and/or what CPU/OS it is running on.

I'd suggest stepping through your code in a debugger to see which line causes
the problem. If your code is short, you could also try to post it here.

--
T.E.D.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




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

* help
@ 2001-09-19 19:51 mop
  2001-09-20  8:41 ` help John McCabe
  0 siblings, 1 reply; 21+ messages in thread
From: mop @ 2001-09-19 19:51 UTC (permalink / raw)



i need a procedure/function to compute the checksum on this record and put
result in last byte "Checksum" of record.  my data is really 8 8 bit words
though my for use clause has a 32 bit "type" setup.

in my spec.
  type COMMAND_TYPE is
    record
      Command                         : CT.UNSIGNED_3;
      Mode                            :  MODE_TYPE;
      Spare1                          : CT.UNSIGNED_3;
      Mode_Command                    : MODE_COMMAND_TYPE;
      Spare2                          : CT.UNSIGNED_2;
      Power_Removal_Indication        : POWER_REMOVAL_INDICATION_TYPE;
      Spare3                          : CT.UNSIGNED_2;
      Energy                          : ENERGY_TYPE;
      Spare4                          : CT.UNSIGNED_1;
      Fan_Control                     : FAN_CONTROL_TYPE;
      Receiver_Test                   : RECEIVER_TEST_TYPE;
      TPG_Control                     : TPG_CONTROL_TYPE;
      Position                        : POSITION_TYPE;
      Length                          : LENGTH_TYPE;
      Spare5                          : CT.BYTE;
      Spare6                          : CT.BYTE;
      Spare7                          : CT.BYTE;
      Table_Number                    : CT.UNSIGNED_4;
      Spare8                          : CT.UNSIGNED_4;
      Checksum                        : CT.BYTE;
    end record;

  --  Variable_Name                     Base_Offset  Size
  ----------------------------------------------------------
  for COMMAND_TYPE use
    record
      Command                         at 0 range 0 .. 2;     -- 3 bits
      Mode                            at 0 range 3 .. 3;     -- 1 bit
      Spare1                          at 0 range 4 .. 7;     -- 3 bits
      Mode_Command                    at 0 range 8 .. 10;    -- 3 bits
      Spare2                          at 0 range 11 ..12;    -- 2 bits
      Power_Removal_Indication        at 0 range 13 .. 13;   -- 1 bit
      Spare3                          at 0 range 14 .. 15;   -- 2 bits
      Energy                          at 0 range 16 .. 17;   -- 2 bits
      Spare4                          at 0 range 18 .. 18;   -- 1 bit
      Fan_Control                     at 0 range 19 .. 19;   -- 1 bit
      Receiver_Test                   at 0 range 20 .. 20;   -- 1 bit
      TPG_Control                     at 0 range 21 .. 21;   -- 1 bit
      Position                        at 0 range 22 .. 22;   -- 1 bit
      Length                          at 0 range 23 .. 23;   -- 1 bit
      Spare5                          at 0 range 24 .. 31;
      Spare6                          at 1 range 0  .. 7;
      Spare7                          at 1 range 8  .. 15;
      Table_Number                    at 1 range 16 .. 19;   -- 4 bits
      Spare8                          at 1 range 20 .. 23;   -- 4 bits
      Checksum                        at 1 range 24 .. 31;
    end record;
  for COMMAND_TYPE'size use 64;



in my body.  I have default values setup.  this will change of course
depending on user selection.  Again I need a procedure/function to compute
the checksum and store value in "Checksum"

 CMD_Data : COMMAND_TYPE := (
     Command                   => 1,
     Mode                      => Normal_Mode,
     Spare1                    => 0,
     Mode_Command              => Standby,
     Spare2                    => 0,
     Power_Removal_Indication  => Power_Applied,
     Spare3                    => 0,
     Energy                    => Normal_Mode,
     Spare4                    => 0,
     Fan_Control               => Turn_Fan_Off,
     Receiver_Test             => Receiver_Normal,
     TPG_Control               => TPG_Normal,
     Position                  => Left,
     Length                    => Short,
     Spare5                    => 0,
     Spare6                    => 0,
     Spare7                    => 0,
     Table_Number              => 0,
     Spare8                    => 0,
     Checksum                  => 1);



















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

* Re: help
  2001-09-19 19:51 help mop
@ 2001-09-20  8:41 ` John McCabe
  0 siblings, 0 replies; 21+ messages in thread
From: John McCabe @ 2001-09-20  8:41 UTC (permalink / raw)


On Wed, 19 Sep 2001 15:51:54 -0400, "mop"
<mop65715@pegasus.cc.ucf.edu> wrote:

>i need a procedure/function to compute the checksum on this record and put
>result in last byte "Checksum" of record.  my data is really 8 8 bit words
>though my for use clause has a 32 bit "type" setup.

So what's the problem?




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

end of thread, other threads:[~2001-09-20  8:41 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-11-15  0:00 Help Alexander B. Schmidt
1996-11-15  0:00 ` Help Michael Paus
1996-11-18  0:00 ` Help Norman H. Cohen
1996-11-19  0:00 ` Help Matthew Heaney
  -- strict thread matches above, loose matches on Subject: below --
2001-09-19 19:51 help mop
2001-09-20  8:41 ` help John McCabe
1998-12-07  0:00 help Salvador
1998-12-07  0:00 ` help dennison
1997-02-27  0:00 Help Desperate
1997-03-04  0:00 ` Help Jim Dorman
1994-10-19 16:26 HELP CONDIC
1994-10-14  3:33 HELP Chiu Bo (Hung Chiu Hung)
1994-10-14 13:21 ` HELP Robert Dewar
1994-10-15 14:56   ` HELP Bob Duff
1994-10-18 16:31     ` HELP Robert Dewar
1994-10-16  5:11   ` HELP Chiu Bo (Hung Chiu Hung)
1994-10-14 19:36 ` HELP riehler
1994-10-14 19:36 ` HELP Richard Riehle
1994-10-19  3:10 ` HELP Michael M. Bishop
1993-03-12 22:28 Help Basavaraj B Patil
1990-08-01 18:19 Help Kenneth Anderson

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