home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.ada
- Path: sparky!uunet!decwrl!csus.edu!beach.csulb.edu!elliottm
- From: elliottm@beach.csulb.edu (Mike Elliott)
- Subject: pragma INTERFACE to MTH$RANDOM in DEC ADA?
- Message-ID: <ELLIOTTM.92Sep2032817@beach.csulb.edu>
- Lines: 18
- Sender: elliottm@beach.csulb.edu (Mike Elliott)
- Organization: Cal State Long Beach
- Date: Wed, 2 Sep 1992 10:28:20 GMT
-
- I've gotten stuck trying to interface to the VMS math library routine
- MTH$RANDOM, which takes the address of an integer seed as its argument, and
- returns a FLOAT. Ada rightly complains if I declare my routine as a function
- taking an in out INTEGER parameter, but my other attempts to trick DEC ADA into
- iterfacing to this routine have also failed. They include
-
- 1) declaring the function to take a parameter of type access INTEGER, which
- points to an actual intger which can be changed (the INTEGER pointed to
- remains immutable),
-
- 2) declaring the function to take a parameter of type SYSTEM'ADDRESS, and
- passing it the address of some integer (the INTEGER at said address
- remains stubbornly unchanged).
-
- I'm sure there's some way to do this, but my only two DEC ADA manuals shed no
- light on how. They do illustrate how to interface to routines like MTH$SQRT,
- which rightly take a parameter of type in FLOAT, and these attempts have been
- successful.
- --
-
-
- Mike Elliott
- elliottm@beach.csulb.edu
-