Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

K&R C, fortran keyword

39 views
Skip to first unread message

Tim Shoppa

unread,
Dec 19, 2010, 9:41:55 PM12/19/10
to
I think the subject has come up in the far past but I am stretching my
memory... correct me if I'm wrong...

the conclusion was, "fortran" is a reserved keyword in K&R C, but no
compiler ever actually did anything with it? (Unlike say "asm" which
actually did something on some compilers).

Tim.

Dennis Ritchie

unread,
Dec 19, 2010, 11:14:05 PM12/19/10
to

"Tim Shoppa" <sho...@trailing-edge.com> wrote in message
news:fd5d83b5-0283-492b...@39g2000yqa.googlegroups.com...

Yes. The intent was to put out a marker in case we wanted
to put in an interface for specifying a Fortran calling sequence,
but this didn't happen (here, anyway).

Dennis


Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Joe Morris

unread,
Dec 21, 2010, 7:24:05 PM12/21/10
to
"Tim Shoppa" <sho...@trailing-edge.com> wrote:

The early Microsoft C/C++ compiler (1991) supported __fortran as a keyword
to control the order in which arguments were pushed in a /call/ statement.
From the reference manual which somehow is still on my shelf...

__pascal, __fortran

Specifies that the associated function is to be
called using the Pascal or FORTRAN callling
convention (arguments are pushed from left to
right). The __fortran and __pascal modifiers
are synonyms.

The __fortran and __pascal keywords are not
accepted for 32-bit targets.

I don't have a nearby copy of K&R (sorry, Dennis...) to know if this was the
intent of the reference you're citing.

Joe Morris


Howard S Shubs

unread,
Dec 23, 2010, 1:45:28 PM12/23/10
to
In article
<d8fc98f1-24e9-49e0...@y23g2000yqd.googlegroups.com>,
H Vlems <hvl...@freenet.de> wrote:

> The VMS compilers use a common code (or object) standard, don't they?
> That way object files generated by different compilers could be linked
> into one executable file.
> The DEC C compiler followed the standard so it must be possible to
> link C routines to Fortran, or Pascal for that matter, even without
> the presence of the fortran reserved word, right?

Yes. VMS has a calling standard.

--
May all your good dreams and fine wishes come true! - The Wizard
May joy be yours all the days of your life! - Phina

Peter Flass

unread,
Dec 23, 2010, 7:10:51 PM12/23/10
to
On 12/23/2010 1:45 PM, Howard S Shubs wrote:
> In article
> <d8fc98f1-24e9-49e0...@y23g2000yqd.googlegroups.com>,
> H Vlems<hvl...@freenet.de> wrote:
>
>> The VMS compilers use a common code (or object) standard, don't they?
>> That way object files generated by different compilers could be linked
>> into one executable file.
>> The DEC C compiler followed the standard so it must be possible to
>> link C routines to Fortran, or Pascal for that matter, even without
>> the presence of the fortran reserved word, right?
>
> Yes. VMS has a calling standard.
>

So does windoze. In fact, it has several of them.

(see below)

unread,
Dec 23, 2010, 7:57:49 PM12/23/10
to


On 24/12/2010 00:10, in article if0oed$tov$2...@news.eternal-september.org,
"Peter Flass" <Peter...@Yahoo.com> wrote:

The ICT 1900 had a calling standard, ca. 1966, that permitted FORTRAN, Algol
60, and PLAN (assembler) subprograms to call each other. It was even
possible (trivial, actually) to provide Algol-style name parameters to or
from a PLAN routine.

--
Bill Findlay
with blueyonder.co.uk;
use surname & forename;


Howard S Shubs

unread,
Dec 24, 2010, 1:41:32 AM12/24/10
to
In article <if0oed$tov$2...@news.eternal-september.org>,
Peter Flass <Peter...@Yahoo.com> wrote:

> So does windoze. In fact, it has several of them.

Having more than one rather obviates the point, no?

H Vlems

unread,
Dec 24, 2010, 3:40:44 AM12/24/10
to
On 24 dec, 01:10, Peter Flass <Peter_Fl...@Yahoo.com> wrote:
> On 12/23/2010 1:45 PM, Howard S Shubs wrote:
>
> > In article
> > <d8fc98f1-24e9-49e0-8915-a2010c25d...@y23g2000yqd.googlegroups.com>,

> >   H Vlems<hvl...@freenet.de>  wrote:
>
> >> The VMS compilers use a common code (or object) standard, don't they?
> >> That way object files generated by different compilers could be linked
> >> into one executable file.
> >> The DEC C compiler followed the standard so it must be possible to
> >> link C routines to Fortran, or Pascal for that matter, even without
> >> the presence of the fortran reserved word, right?
>
> > Yes.  VMS has a calling standard.
>
> So does  windoze.  In fact, it has several of them.

Sure, you can call Windows by many names ;-)

H Vlems

unread,
Dec 24, 2010, 3:42:21 AM12/24/10
to
On 24 dec, 07:41, Howard S Shubs <how...@shubs.net> wrote:
> In article <if0oed$to...@news.eternal-september.org>,

>  Peter Flass <Peter_Fl...@Yahoo.com> wrote:
>
> > So does  windoze.  In fact, it has several of them.
>
> Having more than one rather obviates the point, no?
>
> --
> May all your good dreams and fine wishes come true! - The Wizard
> May joy be yours all the days of your life! - Phina

Given the fact that the name of this proud Microsoft product was
somewhat misspelled I guess that his tongue was firmly stuck in his
cheek ;-)
Hans

H Vlems

unread,
Dec 24, 2010, 3:46:53 AM12/24/10
to
On 24 dec, 01:57, "(see below)" <n...@findlayw.plus.com> wrote:
> On 24/12/2010 00:10, in article if0oed$to...@news.eternal-september.org,

>
>
>
>
>
> "Peter Flass" <Peter_Fl...@Yahoo.com> wrote:
> > On 12/23/2010 1:45 PM, Howard S Shubs wrote:
> >> In article
> >> <d8fc98f1-24e9-49e0-8915-a2010c25d...@y23g2000yqd.googlegroups.com>,

> >>   H Vlems<hvl...@freenet.de>  wrote:
>
> >>> The VMS compilers use a common code (or object) standard, don't they?
> >>> That way object files generated by different compilers could be linked
> >>> into one executable file.
> >>> The DEC C compiler followed the standard so it must be possible to
> >>> link C routines to Fortran, or Pascal for that matter, even without
> >>> the presence of the fortran reserved word, right?
>
> >> Yes.  VMS has a calling standard.
>
> > So does  windoze.  In fact, it has several of them.
>
> The ICT 1900 had a calling standard, ca. 1966, that permitted FORTRAN, Algol
> 60, and PLAN (assembler) subprograms to call each other. It was even
> possible (trivial, actually) to provide Algol-style name parameters to or
> from a PLAN routine.
>
> --
> Bill Findlay
> with blueyonder.co.uk;
> use  surname & forename;- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

Did PLAN handle call by name as well, or was that mechanism reduced to
call by reference?
The Burroughs/Unisys MCP supports a calling standard too. In fact it
allows you to combine seperately
compiled subroutines written in diferent languages into one
executable. This was done by SYSTEM/BINDER,
a neat tool that even allowed you to replace subroutine modules in an
existing executable so you didn't need to recompile
the entire program. BTW the binder was not a linker, the MCP has no
need for a linker (nor an assembler).
Hans

(see below)

unread,
Dec 24, 2010, 8:51:05 AM12/24/10
to


On 24/12/2010 08:46, in article
84d20ea6-c7b3-4898...@39g2000yqa.googlegroups.com, "H Vlems"
<hvl...@freenet.de> wrote:

> On 24 dec, 01:57, "(see below)" <n...@findlayw.plus.com> wrote:

...


>> The ICT 1900 had a calling standard, ca. 1966, that permitted FORTRAN, Algol
>> 60, and PLAN (assembler) subprograms to call each other. It was even
>> possible (trivial, actually) to provide Algol-style name parameters to or
>> from a PLAN routine.
>>
>> --
>> Bill Findlay
>

> Did PLAN handle call by name as well, or was that mechanism reduced to
> call by reference?

Each parameter was represented by an instruction that determined its address
or value, as appropriate, compiled in a sequence of N orders for an N
parameter routine, following the "CALL X S" instruction.

Parameter P was obtained from within S by the instruction "OBEY P(X)" where
OBEY is an execute-type instruction that causes the operand to be executed
as an order.

For a simple value- or reference-parameter, "OBEY P(X)" would be done once
by the subroutine, and the OBEYed instruction would be a simple load into an
ABI-defined register. For a name parameter, the OBEYed instruction would
itself be a subroutine call, to a thunk, with the same ultimate effect.

Value-, result-, value-result-, reference-, lazy- and name- parameter
policies can all by obtained by this mechanism (in the case of name by
OBEYing the thunk on every use of the formal parameter).

Return was by "EXIT X N", which jumped back to the point after the Nth thunk
order.

Esra Sdrawkcab

unread,
Dec 26, 2010, 8:54:59 AM12/26/10
to
On Fri, 24 Dec 2010 08:40:44 -0000, H Vlems <hvl...@freenet.de> wrote:

> On 24 dec, 01:10, Peter Flass <Peter_Fl...@Yahoo.com> wrote:
>> On 12/23/2010 1:45 PM, Howard S Shubs wrote:
>>

[snipped]


>> > Yes. VMS has a calling standard.
>>
>> So does windoze. In fact, it has several of them.
>
> Sure, you can call Windows by many names ;-)

"The great thing about standards is that we have so many to choose from"

(to paraphrase a quote from someone)

--
"Nuns! NUNS! Reverse! Reverse!"

Charles Richmond

unread,
Dec 27, 2010, 11:30:51 PM12/27/10
to

One of my favorite quotes!!! Along with:

"I love deadlines!
I like the whizzing sound they make as they rush by!!!"

--
+----------------------------------------+
| Charles and Francis Richmond |
| |
| plano dot net at aquaporin4 dot com |
+----------------------------------------+

Gene Wirchenko

unread,
Dec 29, 2010, 12:43:53 PM12/29/10
to
On Mon, 27 Dec 2010 22:30:51 -0600, Charles Richmond
<fri...@tx.rr.com> wrote:

>On 12/26/10 7:54 AM, Esra Sdrawkcab wrote:
>> On Fri, 24 Dec 2010 08:40:44 -0000, H Vlems <hvl...@freenet.de>
>> wrote:
>>
>>> On 24 dec, 01:10, Peter Flass <Peter_Fl...@Yahoo.com> wrote:
>>>> On 12/23/2010 1:45 PM, Howard S Shubs wrote:
>>>>
>> [snipped]
>>>> > Yes. VMS has a calling standard.
>>>>
>>>> So does windoze. In fact, it has several of them.
>>>
>>> Sure, you can call Windows by many names ;-)
>>
>> "The great thing about standards is that we have so many to choose
>> from"
>>
>> (to paraphrase a quote from someone)
>>
>
>One of my favorite quotes!!! Along with:
>
>"I love deadlines!
> I like the whizzing sound they make as they rush by!!!"

I like the both of them. Here is another in the same vein:

Another day done
All targets met
All systems fully operational
All customers satisfied
All staff keen and well motivated
All pigs fed and ready for take off

Sincerely,

Gene Wirchenko

Jan van den Broek

unread,
Dec 30, 2010, 6:36:05 AM12/30/10
to
Mon, 27 Dec 2010 22:30:51 -0600
Charles Richmond <fri...@tx.rr.com> schrieb:

[Schnipp]

>One of my favorite quotes!!! Along with:
>
>"I love deadlines!
> I like the whizzing sound they make as they rush by!!!"

Douglas Adams
--
Jan van den Broek
balg...@xs4all.nl 0xAFDAD00D
http://huizen.dds.nl/~balglaas/

Jorgen Grahn

unread,
Dec 30, 2010, 7:32:15 PM12/30/10
to

Andrew Tanenbaum, according to fortune(6).

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .

Charles Richmond

unread,
Dec 30, 2010, 11:40:54 PM12/30/10
to
On 12/30/10 4:36 PM, Jan van den Broek wrote:
> Mon, 27 Dec 2010 22:30:51 -0600
> Charles Richmond<fri...@tx.rr.com> schrieb:
>
> [Schnipp]
>
>> One of my favorite quotes!!! Along with:
>>
>> "I love deadlines!
>> I like the whizzing sound they make as they rush by!!!"
>
> Douglas Adams

That's what I was thinking... so I googled it up...

Seems I paraphrased his actual quote:

"I love deadlines.
I like the whooshing sound they make as they fly by."
-- Douglas Adams

Esra Sdrawkcab

unread,
Jan 14, 2011, 5:41:25 AM1/14/11
to
On Tue, 28 Dec 2010 04:30:51 -0000, Charles Richmond <fri...@tx.rr.com>
wrote:

> On 12/26/10 7:54 AM, Esra Sdrawkcab wrote:
>> On Fri, 24 Dec 2010 08:40:44 -0000, H Vlems <hvl...@freenet.de>
>> wrote:
>>
>>> On 24 dec, 01:10, Peter Flass <Peter_Fl...@Yahoo.com> wrote:
>>>> On 12/23/2010 1:45 PM, Howard S Shubs wrote:
>>>>
>> [snipped]
>>>> > Yes. VMS has a calling standard.
>>>>
>>>> So does windoze. In fact, it has several of them.
>>>
>>> Sure, you can call Windows by many names ;-)
>>
>> "The great thing about standards is that we have so many to choose
>> from"
>>
>> (to paraphrase a quote from someone)
>>
>
> One of my favorite quotes!!! Along with:
>
> "I love deadlines!
> I like the whizzing sound they make as they rush by!!!"
>

"whooshing" pshurely?

http://en.wikipedia.org/wiki/Douglas_adams

</pedant mode>

0 new messages