Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Reserved Words
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 26 - 35 of 35 - Collapse all  -  Translate all to Translated (View all originals) < Older 
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Thomas Koenig  
View profile  
 More options Aug 16 2012, 3:39 pm
Newsgroups: comp.lang.fortran, comp.lang.pl1, comp.lang.cobol
From: Thomas Koenig <tkoe...@netcologne.de>
Date: Thu, 16 Aug 2012 19:39:09 +0000 (UTC)
Local: Thurs, Aug 16 2012 3:39 pm
Subject: Re: Reserved Words
Of course, there's the classic

       DO I = 1.100
         PRINT *,I
 100   CONTINUE
       END

which doesn't do what you expect at first glance.

       IMPLICIT NONE

would catch it, and also

       IMPLICIT CHARACTER*1 (A-Z)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard Maine  
View profile  
 More options Aug 17 2012, 9:07 am
Newsgroups: comp.lang.fortran, comp.lang.pl1, comp.lang.cobol
From: nos...@see.signature (Richard Maine)
Date: Fri, 17 Aug 2012 06:07:45 -0700
Local: Fri, Aug 17 2012 9:07 am
Subject: Re: Reserved Words

Thomas Koenig <tkoe...@netcologne.de> wrote:
> Of course, there's the classic

>        DO I = 1.100
>          PRINT *,I
>  100   CONTINUE
>        END

> which doesn't do what you expect at first glance.

>        IMPLICIT NONE

> would catch it, and also

>        IMPLICIT CHARACTER*1 (A-Z)

As would using free source form (in f90 or later).

--
Richard Maine                    | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle           |  -- Mark Twain


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bill Gunshannon  
View profile  
 More options Aug 17 2012, 9:23 am
Newsgroups: comp.lang.fortran, comp.lang.pl1, comp.lang.cobol
From: billg...@cs.uofs.edu (Bill Gunshannon)
Date: 17 Aug 2012 13:23:22 GMT
Local: Fri, Aug 17 2012 9:23 am
Subject: Re: Reserved Words
In article <k0ji8t$sn...@newsreader4.netcologne.de>,
        Thomas Koenig <tkoe...@netcologne.de> writes:

> Of course, there's the classic

>        DO I = 1.100
>          PRINT *,I
>  100   CONTINUE
>        END

> which doesn't do what you expect at first glance.

>        IMPLICIT NONE

> would catch it, and also

>        IMPLICIT CHARACTER*1 (A-Z)

Funny, it would do exactly what I expect.  But then, I know Fortran
and therefore know exactly what it is going to do. :-)

bill

--
Bill Gunshannon          |  de-moc-ra-cy (di mok' ra see) n.  Three wolves
billg...@cs.scranton.edu |  and a sheep voting on what's for dinner.
University of Scranton   |
Scranton, Pennsylvania   |         #include <std.disclaimer.h>  


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
robin.vow...@gmail.com  
View profile  
 More options Sep 23 2012, 10:11 pm
Newsgroups: comp.lang.cobol
From: robin.vow...@gmail.com
Date: Sun, 23 Sep 2012 19:11:23 -0700 (PDT)
Local: Sun, Sep 23 2012 10:11 pm
Subject: Re: Reserved Words

Shouldn't have to do that.
It's a waste of everybody's time.

FORTRAN did not have reserved words (and still does not).
PL/I has no reserved words, and has a larger "vocabulary" than COBOL.

The meaning of a word is determined by context.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
robin.vow...@gmail.com  
View profile  
 More options Sep 23 2012, 10:23 pm
Newsgroups: comp.lang.cobol
From: robin.vow...@gmail.com
Date: Sun, 23 Sep 2012 19:23:22 -0700 (PDT)
Local: Sun, Sep 23 2012 10:23 pm
Subject: Re: Reserved Words

Just because it's legal in fixed source form doesn't mean that
you have to use it.
Fixed source form is prone to letting errors slip though undetected.
Free source form doesn't admit such an error.
Nor would it admit the earlier error (though it would it the DO
statement were written
   DO1I = 1.10
in which case IMPLICIT NONE would probably catch it.)
But why use such an obsolete form anyway?
  DO I = 1.10
would be detected as an error in free source form.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robin Vowels  
View profile  
 More options Sep 23 2012, 10:31 pm
Newsgroups: comp.lang.fortran, comp.lang.pl1, comp.lang.cobol
From: Robin Vowels <robin.vow...@gmail.com>
Date: Sun, 23 Sep 2012 19:31:34 -0700 (PDT)
Local: Sun, Sep 23 2012 10:31 pm
Subject: Re: Reserved Words
On Aug 17, 5:39 am, Thomas Koenig <tkoe...@netcologne.de> wrote:

> Of course, there's the classic

>        DO I = 1.100
>          PRINT *,I
>  100   CONTINUE
>        END

> which doesn't do what you expect at first glance.

Only in fixed source form.
It isn't a good idea to write code in fixed source form,
on account of errors that can slip by undiagnosed by the compiler.

The error would be detected in free source form -- with or without
IMPLICIT NONE.

But IMPLICIT NONE  is a good idea anyway, for other reasons.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dick Hendrickson  
View profile  
 More options Sep 24 2012, 5:01 pm
Newsgroups: comp.lang.fortran, comp.lang.pl1, comp.lang.cobol
From: Dick Hendrickson <dick.hendrick...@att.net>
Date: Mon, 24 Sep 2012 16:01:38 -0500
Local: Mon, Sep 24 2012 5:01 pm
Subject: Re: Reserved Words
On 9/23/12 9:31 PM, Robin Vowels wrote:

How about
          DOI = 1.100

There's no limit to the number of syntax errors people can make.

Dick Hendrickson


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michel Olagnon  
View profile  
 More options Sep 25 2012, 3:00 am
Newsgroups: comp.lang.fortran, comp.lang.pl1, comp.lang.cobol
From: Michel Olagnon <molag...@ifremer-a-oter.fr>
Date: Tue, 25 Sep 2012 09:00:08 +0200
Local: Tues, Sep 25 2012 3:00 am
Subject: Re: Reserved Words
Dick Hendrickson écrivit :

IF (N .GT. NMAX) THEN K = 1

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Phillip Helbig---undress to reply  
View profile  
 More options Sep 25 2012, 4:32 am
Newsgroups: comp.lang.fortran, comp.lang.pl1, comp.lang.cobol
From: hel...@astro.multiCLOTHESvax.de (Phillip Helbig---undress to reply)
Date: Tue, 25 Sep 2012 08:32:44 +0000 (UTC)
Local: Tues, Sep 25 2012 4:32 am
Subject: Re: Reserved Words
In article <acd33qFp85...@mid.individual.net>, Michel Olagnon

<molag...@ifremer-a-oter.fr> writes:
> > There's no limit to the number of syntax errors people can make.

> IF (N .GT. NMAX) THEN K = 1

Right.  Of course, it should probably be

   IF (N .GT. NMAX) K = 1

If one also writes DCL (VMS "shell" language), this is dangerous since
there the two forms are

IF expression THEN
   statement(s)
ELSE
   statement(s)
ENDIF

and

IF expression THEN statement

(Note: no parenthesis required around expression and no ELSEIF.)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robin Vowels  
View profile  
 More options Sep 26 2012, 10:51 am
Newsgroups: comp.lang.fortran, comp.lang.pl1, comp.lang.cobol
From: Robin Vowels <robin.vow...@gmail.com>
Date: Wed, 26 Sep 2012 07:51:27 -0700 (PDT)
Local: Wed, Sep 26 2012 10:51 am
Subject: Re: Reserved Words
On Sep 25, 7:01 am, Dick Hendrickson <dick.hendrick...@att.net> wrote:

That also would be detected as an error in fixed-source form
(assuming that IMPLICIT NONE is on, and that there is no variable
name DOI in a declaration).

> There's no limit to the number of syntax errors people can make.

In fixed source form.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages < Older 
« Back to Discussions « Newer topic     Older topic »