Title: | Languages |
Notice: | Speaking In Tongues |
Moderator: | TLE::TOKLAS::FELDMAN |
Created: | Sat Jan 25 1986 |
Last Modified: | Wed May 21 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 394 |
Total number of notes: | 2683 |
We are developing a large software product using many VAX/VMS languages for many different reasons. While the VAX calling procedure standards specify the set of common data types, not all VMS languages, VMS system services, and VMS run-time library services support all the possible data types. Moreover, I suspect that "record definition" created in one language may use different default field alignment rules than languages. So how do we avoid tower of babel? Seems like we need to understand what are the common, shared data types and stick with those when crossing language and service interfaces. What calling procedures with optional args? Some languages might allow you call a procedure ( proc_a (a,b,c)) with 3 arguments passed by reference in such a way that the first and second arg are null representd by 0 in the argument list. Do any VAX languages not allow a procedure to check if a received argument is 0? (I hope to avoid any access violations that might occur by accessing the data segment referenced by a null pointer of 0). And what about the third argument, c? Can all/most languages enable the program to detect at run-time that arg list only contains 2 passed arguments? I'm sure that other groups have solved these issues in the past but I'm just a - Bliss coder
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
150.1 | From the point of view of Ada | TLE::MEIER | Bill Meier - VAX Ada | Thu Sep 17 1987 18:53 | 17 |
You can not omit arguments (or pass 0 expecting for it to be considered "not present"), nor can you check that the call has the correct number of arguments with Ada. Note that this is not a problem when writing all in Ada, as _all_ procedure call checking is done at compiler time, across all modules in your program. Its not a problem calling other routines from Ada, because you can't express those constructs. Its only a problem calling into Ada routines. But, don't consider this a "weakness" of Ada. The ANSI standard does not allow us to change the syntax of the language. I suppose you could write a simple Bliss routine, that was called by an Ada routine, that would look up the stack to find the number of arguments passed to the Ada routine, and return that. And, you could call that procedure from Ada. Note that you might be tempted to JSB to this routine and just look at 0(AP), but Ada has no way of specifying this "external" routine be called with JSB linkage. Maybe someday... This may not the greatest way, but if you _require_ this type of runtime checking, thats what you will have to do. Thats one plus for Ada; you don't need to design any of that runtime checking into your program, because it was all checked at compiletime. | |||||
150.2 | OED::BEYER | Hugh R. Beyer | Sat Sep 19 1987 20:37 | 6 | |
Get a copy of the CDD documentation to answer the datatype question. There's a table in there listing all the languages that support the CDD and what datatypes they support. The CDD will also allow you to define a record once and read it from any supporting language. HRB |