comp.lang.ada
 help / color / mirror / Atom feed
* 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
* 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
* 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
* 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
* 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
@ 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
* 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
@ 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

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 --
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
  -- 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
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
1994-10-19 16:26 HELP CONDIC
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