Re: missing include by compiler

From: Richard Maine (nospam_at_see.signature)
Date: 04/08/04


Date: 08 Apr 2004 08:25:08 -0700


"Charles Russell" <STOPworworSPAM@bellsouth.net> writes:

> Another wish for my Christmas list: some way to assign a name to a block of
> code and reference it by name as in pascal.

As others have noted, this sounds sort of like internal procedures.
My Pascal is rusty enough that I'd having a little trouble in figuring
out what you are talking about in Pascal unless it is procedures
and functions. My handiest Pascal reference is a little dated, but
of good pedigree anyway (Jensen&Worth). Procedures and functions
are the closest thing that I see there to a block with a name; bunch
of other blockish things, but none of them have names. If Pascal
procedures and functions are what you are talking about, then
those really are directly comparable to Fortran internal procedures.

If you are talking about something else, then I'm less sure. Maybe
it is from something newer than my J&W.

I have seen (and support to at least some degree - whether I'd assign
it a very high priority is another question) proposals to add another
block structure to Fortran - something like what can be achieved with

  my_block_name: do
    ...
    exit my_block_name
  end do my_block_name

except that the above way to do it is horribly error prone IMO.
(You want a "do one time", but it is written as a "do forever"
with an exit. Forget the exit and you have an infinite loop.)
You can no doubt fake the same thing in other ways (an f2003
ASSOCIATE might do), but it would seem more straightforward
to have a construct that actually meant what it was being used
for instead of trying to twist some other construct to the
purpose.

This is a construct that might talk me into getting rid of the
large majority of the gotos remaining in my new code - the ones
that currently goto somewhere to handle cleanup and exit in an
error state.

-- 
Richard Maine                       |  Good judgment comes from experience;
email: my first.last at org.domain  |  experience comes from bad judgment.
org: nasa, domain: gov              |        -- Mark Twain


Relevant Pages

  • Re: [PATCH RFD] alternative kobject release wait mechanism
    ... exit() routines will have to ... exit routine, but to make things work the routine would have to wait for ... The goal of immediate-disconnect is to remove such lingering reference ... If you unregister from all layers a device ...
    (Linux-Kernel)
  • Re: gcc: "warning: `noreturn function does return"
    ... >> can reference it directly. ... So what am I missing? ... aren't calling _exit you are calling __libc__exit, ...
    (comp.unix.programmer)
  • Re: What does `my do?!
    ... clear the variable on scope exit, ... point clearing it on scope entry as well. ... through a reference, and now stores at this location a reference to ... memory buffers to 0...) ...
    (comp.lang.perl.misc)
  • Re: Updating a text date field?
    ... I do have the "Calculate on exit" option checked! ... heading to generate the reference. ... Regards, ... > Hi Alan, ...
    (microsoft.public.word.newusers)