Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Perl programming is an *empirical* science! -- Larry Wall in <10226@jpl-devvax.JPL.NASA.GOV>


devel / comp.lang.fortran / is there a better way to code this ?

SubjectAuthor
* is there a better way to code this ?Lynn McGuire
+- Re: is there a better way to code this ?gah4
+* Re: is there a better way to code this ?pmk
|`- Re: is there a better way to code this ?gah4
+* Re: is there a better way to code this ?gah4
|+* Re: is there a better way to code this ?Lynn McGuire
||+* Re: is there a better way to code this ?jfh
|||`* Re: is there a better way to code this ?Lynn McGuire
||| `* Re: is there a better way to code this ?gah4
|||  `* Re: is there a better way to code this ?Lynn McGuire
|||   +* Re: is there a better way to code this ?gah4
|||   |+- Re: is there a better way to code this ?Lynn McGuire
|||   |+* Re: is there a better way to code this ?Lynn McGuire
|||   ||`* Re: is there a better way to code this ?gah4
|||   || `- Re: is there a better way to code this ?Lynn McGuire
|||   |`- Re: is there a better way to code this ?Gary Scott
|||   `- Re: is there a better way to code this ?Robin Vowels
||`- Re: is there a better way to code this ?gah4
|`* Re: is there a better way to code this ?Lynn McGuire
| `* Re: is there a better way to code this ?p.kinsler
|  +- Re: is there a better way to code this ?Lynn McGuire
|  +* Re: is there a better way to code this ?gah4
|  |`- Re: is there a better way to code this ?Thomas Koenig
|  `* Re: is there a better way to code this ?jfh
|   +* Re: is there a better way to code this ?gah4
|   |`- Re: is there a better way to code this ?Robin Vowels
|   `* Re: is there a better way to code this ?Ron Shepard
|    +- Re: is there a better way to code this ?pehache
|    +* Re: is there a better way to code this ?Thomas Koenig
|    |`* Re: is there a better way to code this ?Lynn McGuire
|    | `- Re: is there a better way to code this ?Thomas Koenig
|    `- Re: is there a better way to code this ?James Van Buskirk
+* Re: is there a better way to code this ?Ev. Drikos
|`* Why I can't read from a parameter string? [was: is there a better wayEv. Drikos
| `* Re: Why I can't read from a parameter string? [was: is there aThomas Koenig
|  `* Re: Why I can't read from a parameter string? [was: is there a betterEv. Drikos
|   +* Re: Why I can't read from a parameter string? [was: is there a betterEv. Drikos
|   |`* Re: Why I can't read from a parameter string? [was: is there a betterRon Shepard
|   | `* Re: Why I can't read from a parameter string? [was: is there a bettergah4
|   |  `- Re: Why I can't read from a parameter string? [was: is there a better way to codPhillip Helbig (undress to reply
|   `- Re: Why I can't read from a parameter string? [was: is there aThomas Koenig
`* Re: is there a better way to code this ?Robin Vowels
 `* Re: is there a better way to code this ?John
  +* Re: is there a better way to code this ?Robin Vowels
  |`* Re: is there a better way to code this ?Lynn McGuire
  | `* Re: is there a better way to code this ?Robin Vowels
  |  `* Re: is there a better way to code this ?Lynn McGuire
  |   `- Re: is there a better way to code this ?gah4
  `* Re: is there a better way to code this ?David Jones
   `- Re: is there a better way to code this ?Lynn McGuire

Pages:12
is there a better way to code this ?

<t85qc4$kr5$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2357&group=comp.lang.fortran#2357

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran
Subject: is there a better way to code this ?
Date: Sun, 12 Jun 2022 17:46:26 -0500
Organization: A noiseless patient Spider
Lines: 73
Message-ID: <t85qc4$kr5$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 12 Jun 2022 22:46:28 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="2bef1568d93bb4eff359edfd3742ab3b";
logging-data="21349"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/+VZLya/SPqsJ0O4JP5JE2"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:kDYE/fq8njmCqrVuTFcvHOSO/NY=
Content-Language: en-US
 by: Lynn McGuire - Sun, 12 Jun 2022 22:46 UTC

So, is there a better way to code this ?

C CHECK THE COMMANDS WHICH SHOULD HAVE EQUAL SIGN
C 10 - no equal sign required
C 11 - equal sign required
C LEQUL=.TRUE.
IF (ICEP .GT. 100) GO TO 1002
C ICEP = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
GO TO( 10, 11, 11, 10, 10, 11, 11, 11, 10, 11, 10, 11, 11, 10, 10,
C ICEP = 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
* 10, 10, 11, 11, 11, 10, 10, 10, 10, 11, 10, 11, 11, 11, 11,
C ICEP = 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
* 11, 10, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 11,
C ICEP = 46 47 48 79 50
* 10, 11, 11, 11, 11,
C ICEP = 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
* 10, 10, 11, 11, 10, 11, 11, 10, 11, 11, 10, 11, 10, 11, 11,
C ICEP = 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
* 11, 10, 10, 11, 10, 11, 11, 10, 11, 11, 11, 11, 11, 11, 11,
C ICEP 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
* 11, 11, 10, 10, 11, 11, 11, 11, 11, 10, 10, 10, 10, 11, 11,
C ICEP 96 97 98 99 100
* 11, 10, 10, 11, 11), icep
1002 IF (ICEP .GT. 200) GO TO 1004
NN = ICEP - 100
C ICEP = 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
GO TO( 11, 10, 10, 10, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10,
C ICEP 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
* 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
C ICEP 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
* 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11,
C ICEP 146 147 148 149 150
* 11, 10, 11, 11, 11,
C ICEP = 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
* 10, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 11, 10, 11,
C ICEP 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
* 11, 10, 10, 10, 10, 10, 10, 10, 11, 10, 11, 11, 11, 10, 11,
C ICEP 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
* 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 11, 11, 11, 10, 11,
C 196 197 198 199 200
* 11, 11, 11, 11, 10), NN
1004 IF (ICEP .GT. 300) goto 1006
NN = ICEP - 200
C ICEP = 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
GO TO( 11, 10, 11, 11, 11, 11, 10, 11, 11, 11, 10, 10, 11, 11, 10,
C 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
* 11, 11, 11, 11, 10, 10, 10, 10, 11, 10, 10, 10, 10, 11, 11,
C 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
* 11, 11, 11, 11, 11, 10, 11, 10, 10, 10, 11, 11, 11, 11, 10,
C 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
* 11, 11, 11, 10, 11, 11, 10, 10, 10, 11, 11, 11, 11, 11, 11,
C 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
* 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11,
C 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290
* 10, 11, 10, 10, 10, 10, 10, 11, 11, 10, 11, 11, 11, 10, 11,
C 291 292 293 294 295 296 297 298 299 300
* 11, 11, 11, 10, 10, 10, 10, 10, 10, 10), NN
1006 IF (ICEP .GT. gen_maxcep) GO TO 1111
NN = ICEP - 300
C 301 302 303 304 305 306 307 308 309 310
GO TO ( 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
C 311 312 313 314 315 316 317 318 319 320
* 11, 11, 11, 11, 11, 10, 10, 10, 10, 10,
C 321 322 323 324 325 326 327 328 329 330
* 10, 10, 10, 10, 10, 10, 10, 10, 11, 11,
C 331 332 333 334 335 336 337 338 339 340
* 10, 10, 11, 11, 11, 11, 10, 10, 10, 10,
C 341 342 343 344 345 346 347 348 349 350
* 11, 11, 11, 11, 10, 11, 11, 11, 10, 10 ), NN

Thanks,
Lynn

Re: is there a better way to code this ?

<bcf5d6e3-95f2-48d3-97b6-05ee07d066d9n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2358&group=comp.lang.fortran#2358

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ac8:57c3:0:b0:305:2dbd:92b3 with SMTP id w3-20020ac857c3000000b003052dbd92b3mr4237720qta.173.1655075148818;
Sun, 12 Jun 2022 16:05:48 -0700 (PDT)
X-Received: by 2002:a0d:d8c9:0:b0:313:eca0:d940 with SMTP id
a192-20020a0dd8c9000000b00313eca0d940mr10250698ywe.287.1655075148381; Sun, 12
Jun 2022 16:05:48 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sun, 12 Jun 2022 16:05:48 -0700 (PDT)
In-Reply-To: <t85qc4$kr5$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:d006:d4e3:f01:6e08;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:d006:d4e3:f01:6e08
References: <t85qc4$kr5$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bcf5d6e3-95f2-48d3-97b6-05ee07d066d9n@googlegroups.com>
Subject: Re: is there a better way to code this ?
From: gah4@u.washington.edu (gah4)
Injection-Date: Sun, 12 Jun 2022 23:05:48 +0000
Content-Type: text/plain; charset="UTF-8"
 by: gah4 - Sun, 12 Jun 2022 23:05 UTC

On Sunday, June 12, 2022 at 3:46:32 PM UTC-7, Lynn McGuire wrote:
> So, is there a better way to code this ?
>
> C CHECK THE COMMANDS WHICH SHOULD HAVE EQUAL SIGN
> C 10 - no equal sign required
> C 11 - equal sign required
> C
> LEQUL=.TRUE.
> IF (ICEP .GT. 100) GO TO 1002
> C ICEP = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
> GO TO( 10, 11, 11, 10, 10, 11, 11, 11, 10, 11, 10, 11, 11, 10, 10,
> C ICEP = 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
> * 10, 10, 11, 11, 11, 10, 10, 10, 10, 11, 10, 11, 11, 11, 11,
> C ICEP = 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
> * 11, 10, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 11,
> C ICEP = 46 47 48 79 50
> * 10, 11, 11, 11, 11,
> C ICEP = 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
> * 10, 10, 11, 11, 10, 11, 11, 10, 11, 11, 10, 11, 10, 11, 11,
> C ICEP = 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
> * 11, 10, 10, 11, 10, 11, 11, 10, 11, 11, 11, 11, 11, 11, 11,
> C ICEP 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
> * 11, 11, 10, 10, 11, 11, 11, 11, 11, 10, 10, 10, 10, 11, 11,
> C ICEP 96 97 98 99 100
> * 11, 10, 10, 11, 11), icep
> 1002 IF (ICEP .GT. 200) GO TO 1004
> NN = ICEP - 100
> C ICEP = 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
> GO TO( 11, 10, 10, 10, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10,
> C ICEP 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
> * 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
> C ICEP 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
> * 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11,
> C ICEP 146 147 148 149 150
> * 11, 10, 11, 11, 11,
> C ICEP = 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
> * 10, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 11, 10, 11,
> C ICEP 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
> * 11, 10, 10, 10, 10, 10, 10, 10, 11, 10, 11, 11, 11, 10, 11,
> C ICEP 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
> * 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 11, 11, 11, 10, 11,
> C 196 197 198 199 200
> * 11, 11, 11, 11, 10), NN
> 1004 IF (ICEP .GT. 300) goto 1006
> NN = ICEP - 200
> C ICEP = 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
> GO TO( 11, 10, 11, 11, 11, 11, 10, 11, 11, 11, 10, 10, 11, 11, 10,
> C 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
> * 11, 11, 11, 11, 10, 10, 10, 10, 11, 10, 10, 10, 10, 11, 11,
> C 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
> * 11, 11, 11, 11, 11, 10, 11, 10, 10, 10, 11, 11, 11, 11, 10,
> C 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
> * 11, 11, 11, 10, 11, 11, 10, 10, 10, 11, 11, 11, 11, 11, 11,
> C 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
> * 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11,
> C 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290
> * 10, 11, 10, 10, 10, 10, 10, 11, 11, 10, 11, 11, 11, 10, 11,
> C 291 292 293 294 295 296 297 298 299 300
> * 11, 11, 11, 10, 10, 10, 10, 10, 10, 10), NN
> 1006 IF (ICEP .GT. gen_maxcep) GO TO 1111
> NN = ICEP - 300
> C 301 302 303 304 305 306 307 308 309 310
> GO TO ( 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
> C 311 312 313 314 315 316 317 318 319 320
> * 11, 11, 11, 11, 11, 10, 10, 10, 10, 10,
> C 321 322 323 324 325 326 327 328 329 330
> * 10, 10, 10, 10, 10, 10, 10, 10, 11, 11,
> C 331 332 333 334 335 336 337 338 339 340
> * 10, 10, 11, 11, 11, 11, 10, 10, 10, 10,
> C 341 342 343 344 345 346 347 348 349 350
> * 11, 11, 11, 11, 10, 11, 11, 11, 10, 10 ), NN
>
> Thanks,
> Lynn

Since there are only two places to go, a look-up table
and then a two-way branch would do it.

You could even us the same values as array initializers
instead, and then make the branch based on 10 or 11.

It is probably about the same in speed.

Re: is there a better way to code this ?

<5bf0bc42-a1f2-4d7a-bb16-9a152a76f483n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2359&group=comp.lang.fortran#2359

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:248a:b0:464:5f79:e9ea with SMTP id gi10-20020a056214248a00b004645f79e9eamr49829046qvb.47.1655084414792;
Sun, 12 Jun 2022 18:40:14 -0700 (PDT)
X-Received: by 2002:a25:31c2:0:b0:641:660f:230f with SMTP id
x185-20020a2531c2000000b00641660f230fmr55972482ybx.472.1655084414615; Sun, 12
Jun 2022 18:40:14 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sun, 12 Jun 2022 18:40:14 -0700 (PDT)
In-Reply-To: <t85qc4$kr5$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=12.154.207.45; posting-account=hzJ1nwoAAACS3IxtuAkjIfQoNdylflgH
NNTP-Posting-Host: 12.154.207.45
References: <t85qc4$kr5$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5bf0bc42-a1f2-4d7a-bb16-9a152a76f483n@googlegroups.com>
Subject: Re: is there a better way to code this ?
From: pmklausler@gmail.com (pmk)
Injection-Date: Mon, 13 Jun 2022 01:40:14 +0000
Content-Type: text/plain; charset="UTF-8"
 by: pmk - Mon, 13 Jun 2022 01:40 UTC

integer, parameter :: cmdsNeedingEq(*) = [2,3, 6, 7, 8, 10, 12, 13, &
! und so weiter...
346, 347, 348 ]
integer, parameter :: gen_maxcep = 350
logical, parameter :: cmdNeedsEq(*) = [(any(j==cmdsNeedingEq),j=1,gen_maxcep)]
! ...
lequl = .false. ! unless I have reversed the logic
if (icep >= 1 .and. icep <= gen_maxcep) lequl = cmdNeedsEq(icep)

On Sunday, June 12, 2022 at 3:46:32 PM UTC-7, Lynn McGuire wrote:
> So, is there a better way to code this ?
>
> C CHECK THE COMMANDS WHICH SHOULD HAVE EQUAL SIGN
> C 10 - no equal sign required
> C 11 - equal sign required
> C
> LEQUL=.TRUE.
> IF (ICEP .GT. 100) GO TO 1002
> C ICEP = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
> GO TO( 10, 11, 11, 10, 10, 11, 11, 11, 10, 11, 10, 11, 11, 10, 10,
> C ICEP = 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
> * 10, 10, 11, 11, 11, 10, 10, 10, 10, 11, 10, 11, 11, 11, 11,
> C ICEP = 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
> * 11, 10, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 11,
> C ICEP = 46 47 48 79 50
> * 10, 11, 11, 11, 11,
> C ICEP = 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
> * 10, 10, 11, 11, 10, 11, 11, 10, 11, 11, 10, 11, 10, 11, 11,
> C ICEP = 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
> * 11, 10, 10, 11, 10, 11, 11, 10, 11, 11, 11, 11, 11, 11, 11,
> C ICEP 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
> * 11, 11, 10, 10, 11, 11, 11, 11, 11, 10, 10, 10, 10, 11, 11,
> C ICEP 96 97 98 99 100
> * 11, 10, 10, 11, 11), icep
> 1002 IF (ICEP .GT. 200) GO TO 1004
> NN = ICEP - 100
> C ICEP = 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
> GO TO( 11, 10, 10, 10, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10,
> C ICEP 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
> * 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
> C ICEP 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
> * 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11,
> C ICEP 146 147 148 149 150
> * 11, 10, 11, 11, 11,
> C ICEP = 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
> * 10, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 11, 10, 11,
> C ICEP 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
> * 11, 10, 10, 10, 10, 10, 10, 10, 11, 10, 11, 11, 11, 10, 11,
> C ICEP 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
> * 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 11, 11, 11, 10, 11,
> C 196 197 198 199 200
> * 11, 11, 11, 11, 10), NN
> 1004 IF (ICEP .GT. 300) goto 1006
> NN = ICEP - 200
> C ICEP = 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
> GO TO( 11, 10, 11, 11, 11, 11, 10, 11, 11, 11, 10, 10, 11, 11, 10,
> C 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
> * 11, 11, 11, 11, 10, 10, 10, 10, 11, 10, 10, 10, 10, 11, 11,
> C 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
> * 11, 11, 11, 11, 11, 10, 11, 10, 10, 10, 11, 11, 11, 11, 10,
> C 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
> * 11, 11, 11, 10, 11, 11, 10, 10, 10, 11, 11, 11, 11, 11, 11,
> C 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
> * 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11,
> C 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290
> * 10, 11, 10, 10, 10, 10, 10, 11, 11, 10, 11, 11, 11, 10, 11,
> C 291 292 293 294 295 296 297 298 299 300
> * 11, 11, 11, 10, 10, 10, 10, 10, 10, 10), NN
> 1006 IF (ICEP .GT. gen_maxcep) GO TO 1111
> NN = ICEP - 300
> C 301 302 303 304 305 306 307 308 309 310
> GO TO ( 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
> C 311 312 313 314 315 316 317 318 319 320
> * 11, 11, 11, 11, 11, 10, 10, 10, 10, 10,
> C 321 322 323 324 325 326 327 328 329 330
> * 10, 10, 10, 10, 10, 10, 10, 10, 11, 11,
> C 331 332 333 334 335 336 337 338 339 340
> * 10, 10, 11, 11, 11, 11, 10, 10, 10, 10,
> C 341 342 343 344 345 346 347 348 349 350
> * 11, 11, 11, 11, 10, 11, 11, 11, 10, 10 ), NN
>
> Thanks,
> Lynn

Re: is there a better way to code this ?

<375bab02-f98a-464e-aac0-b14c2e39a842n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2360&group=comp.lang.fortran#2360

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:294e:b0:6a7:750b:abf8 with SMTP id n14-20020a05620a294e00b006a7750babf8mr5216183qkp.513.1655085977743;
Sun, 12 Jun 2022 19:06:17 -0700 (PDT)
X-Received: by 2002:a81:1154:0:b0:2fe:d5a4:f26b with SMTP id
81-20020a811154000000b002fed5a4f26bmr64119611ywr.140.1655085977596; Sun, 12
Jun 2022 19:06:17 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sun, 12 Jun 2022 19:06:17 -0700 (PDT)
In-Reply-To: <t85qc4$kr5$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:a437:155c:f640:7e79;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:a437:155c:f640:7e79
References: <t85qc4$kr5$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <375bab02-f98a-464e-aac0-b14c2e39a842n@googlegroups.com>
Subject: Re: is there a better way to code this ?
From: gah4@u.washington.edu (gah4)
Injection-Date: Mon, 13 Jun 2022 02:06:17 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 4242
 by: gah4 - Mon, 13 Jun 2022 02:06 UTC

C CHECK THE COMMANDS WHICH SHOULD HAVE EQUAL SIGN
C 10 - no equal sign required
C 11 - equal sign required

integer needs(350)
data needs/
C ICEP = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
* 10, 11, 11, 10, 10, 11, 11, 11, 10, 11, 10, 11, 11, 10, 10,
C ICEP = 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
* 10, 10, 11, 11, 11, 10, 10, 10, 10, 11, 10, 11, 11, 11, 11,
C ICEP = 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
* 11, 10, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 11,
C ICEP = 46 47 48 79 50
* 10, 11, 11, 11, 11,
C ICEP = 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
* 10, 10, 11, 11, 10, 11, 11, 10, 11, 11, 10, 11, 10, 11, 11,
C ICEP = 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
* 11, 10, 10, 11, 10, 11, 11, 10, 11, 11, 11, 11, 11, 11, 11,
C ICEP 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
* 11, 11, 10, 10, 11, 11, 11, 11, 11, 10, 10, 10, 10, 11, 11,
C ICEP 96 97 98 99 100
* 11, 10, 10, 11, 11,
C ICEP = 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
* 11, 10, 10, 10, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10,
C ICEP 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
* 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
C ICEP 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
* 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11,
C ICEP 146 147 148 149 150
* 11, 10, 11, 11, 11,
C ICEP = 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
* 10, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 11, 10, 11,
C ICEP 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
* 11, 10, 10, 10, 10, 10, 10, 10, 11, 10, 11, 11, 11, 10, 11,
C ICEP 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
* 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 11, 11, 11, 10, 11,
C 196 197 198 199 200
* 11, 11, 11, 11, 10,
C ICEP = 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
* 11, 10, 11, 11, 11, 11, 10, 11, 11, 11, 10, 10, 11, 11, 10,
C 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
* 11, 11, 11, 11, 10, 10, 10, 10, 11, 10, 10, 10, 10, 11, 11,
C 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
* 11, 11, 11, 11, 11, 10, 11, 10, 10, 10, 11, 11, 11, 11, 10,
C 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
* 11, 11, 11, 10, 11, 11, 10, 10, 10, 11, 11, 11, 11, 11, 11,
C 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
* 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11,
C 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290
* 10, 11, 10, 10, 10, 10, 10, 11, 11, 10, 11, 11, 11, 10, 11,
C 291 292 293 294 295 296 297 298 299 300
* 11, 11, 11, 10, 10, 10, 10, 10, 10, 10,
C 301 302 303 304 305 306 307 308 309 310
* 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
C 311 312 313 314 315 316 317 318 319 320
* 11, 11, 11, 11, 11, 10, 10, 10, 10, 10,
C 321 322 323 324 325 326 327 328 329 330
* 10, 10, 10, 10, 10, 10, 10, 10, 11, 11,
C 331 332 333 334 335 336 337 338 339 340
* 10, 10, 11, 11, 11, 11, 10, 10, 10, 10,
C 341 342 343 344 345 346 347 348 349 350
* 11, 11, 11, 11, 10, 11, 11, 11, 10, 10 /

Re: is there a better way to code this ?

<45ad3059-f088-4184-b07e-3a9fee2d9390n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2361&group=comp.lang.fortran#2361

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a37:6387:0:b0:6a6:ae70:ed2e with SMTP id x129-20020a376387000000b006a6ae70ed2emr28743751qkb.618.1655086028452;
Sun, 12 Jun 2022 19:07:08 -0700 (PDT)
X-Received: by 2002:a81:7010:0:b0:30c:c6cf:d4af with SMTP id
l16-20020a817010000000b0030cc6cfd4afmr59794014ywc.459.1655086028312; Sun, 12
Jun 2022 19:07:08 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sun, 12 Jun 2022 19:07:08 -0700 (PDT)
In-Reply-To: <5bf0bc42-a1f2-4d7a-bb16-9a152a76f483n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:a437:155c:f640:7e79;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:a437:155c:f640:7e79
References: <t85qc4$kr5$1@dont-email.me> <5bf0bc42-a1f2-4d7a-bb16-9a152a76f483n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <45ad3059-f088-4184-b07e-3a9fee2d9390n@googlegroups.com>
Subject: Re: is there a better way to code this ?
From: gah4@u.washington.edu (gah4)
Injection-Date: Mon, 13 Jun 2022 02:07:08 +0000
Content-Type: text/plain; charset="UTF-8"
 by: gah4 - Mon, 13 Jun 2022 02:07 UTC


C CHECK THE COMMANDS WHICH SHOULD HAVE EQUAL SIGN
C 10 - no equal sign required
C 11 - equal sign required

integer needs(35)
data needs/
C ICEP = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
* 10, 11, 11, 10, 10, 11, 11, 11, 10, 11, 10, 11, 11, 10, 10,
C ICEP = 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
* 10, 10, 11, 11, 11, 10, 10, 10, 10, 11, 10, 11, 11, 11, 11,
C ICEP = 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
* 11, 10, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 11,
C ICEP = 46 47 48 79 50
* 10, 11, 11, 11, 11,
C ICEP = 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
* 10, 10, 11, 11, 10, 11, 11, 10, 11, 11, 10, 11, 10, 11, 11,
C ICEP = 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
* 11, 10, 10, 11, 10, 11, 11, 10, 11, 11, 11, 11, 11, 11, 11,
C ICEP 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
* 11, 11, 10, 10, 11, 11, 11, 11, 11, 10, 10, 10, 10, 11, 11,
C ICEP 96 97 98 99 100
* 11, 10, 10, 11, 11,
C ICEP = 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
* 11, 10, 10, 10, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10,
C ICEP 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
* 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
C ICEP 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
* 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11,
C ICEP 146 147 148 149 150
* 11, 10, 11, 11, 11,
C ICEP = 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
* 10, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 11, 10, 11,
C ICEP 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
* 11, 10, 10, 10, 10, 10, 10, 10, 11, 10, 11, 11, 11, 10, 11,
C ICEP 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
* 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 11, 11, 11, 10, 11,
C 196 197 198 199 200
* 11, 11, 11, 11, 10,
C ICEP = 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
* 11, 10, 11, 11, 11, 11, 10, 11, 11, 11, 10, 10, 11, 11, 10,
C 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
* 11, 11, 11, 11, 10, 10, 10, 10, 11, 10, 10, 10, 10, 11, 11,
C 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
* 11, 11, 11, 11, 11, 10, 11, 10, 10, 10, 11, 11, 11, 11, 10,
C 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
* 11, 11, 11, 10, 11, 11, 10, 10, 10, 11, 11, 11, 11, 11, 11,
C 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
* 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11,
C 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290
* 10, 11, 10, 10, 10, 10, 10, 11, 11, 10, 11, 11, 11, 10, 11,
C 291 292 293 294 295 296 297 298 299 300
* 11, 11, 11, 10, 10, 10, 10, 10, 10, 10,
C 301 302 303 304 305 306 307 308 309 310
* 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
C 311 312 313 314 315 316 317 318 319 320
* 11, 11, 11, 11, 11, 10, 10, 10, 10, 10,
C 321 322 323 324 325 326 327 328 329 330
* 10, 10, 10, 10, 10, 10, 10, 10, 11, 11,
C 331 332 333 334 335 336 337 338 339 340
* 10, 10, 11, 11, 11, 11, 10, 10, 10, 10,
C 341 342 343 344 345 346 347 348 349 350
* 11, 11, 11, 11, 10, 11, 11, 11, 10, 10 /

Re: is there a better way to code this ?

<t886bm$8cq$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2362&group=comp.lang.fortran#2362

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran
Subject: Re: is there a better way to code this ?
Date: Mon, 13 Jun 2022 15:23:18 -0500
Organization: A noiseless patient Spider
Lines: 69
Message-ID: <t886bm$8cq$1@dont-email.me>
References: <t85qc4$kr5$1@dont-email.me>
<375bab02-f98a-464e-aac0-b14c2e39a842n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 13 Jun 2022 20:23:18 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="5acd2e333180f10a988dc4f4ccc77d9f";
logging-data="8602"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18B9RQ4jNJwRh14LoLRwIsq"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:MIZSYNi+9il8/hSUQmQ++kPSrVo=
In-Reply-To: <375bab02-f98a-464e-aac0-b14c2e39a842n@googlegroups.com>
Content-Language: en-US
 by: Lynn McGuire - Mon, 13 Jun 2022 20:23 UTC

On 6/12/2022 9:06 PM, gah4 wrote:
> C CHECK THE COMMANDS WHICH SHOULD HAVE EQUAL SIGN
> C 10 - no equal sign required
> C 11 - equal sign required
>
> integer needs(350)
> data needs/
> C ICEP = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
> * 10, 11, 11, 10, 10, 11, 11, 11, 10, 11, 10, 11, 11, 10, 10,
> C ICEP = 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
> * 10, 10, 11, 11, 11, 10, 10, 10, 10, 11, 10, 11, 11, 11, 11,
> C ICEP = 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
> * 11, 10, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 11,
> C ICEP = 46 47 48 79 50
> * 10, 11, 11, 11, 11,
> C ICEP = 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
> * 10, 10, 11, 11, 10, 11, 11, 10, 11, 11, 10, 11, 10, 11, 11,
> C ICEP = 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
> * 11, 10, 10, 11, 10, 11, 11, 10, 11, 11, 11, 11, 11, 11, 11,
> C ICEP 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
> * 11, 11, 10, 10, 11, 11, 11, 11, 11, 10, 10, 10, 10, 11, 11,
> C ICEP 96 97 98 99 100
> * 11, 10, 10, 11, 11,
> C ICEP = 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
> * 11, 10, 10, 10, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10,
> C ICEP 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
> * 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
> C ICEP 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
> * 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11,
> C ICEP 146 147 148 149 150
> * 11, 10, 11, 11, 11,
> C ICEP = 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
> * 10, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 11, 10, 11,
> C ICEP 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
> * 11, 10, 10, 10, 10, 10, 10, 10, 11, 10, 11, 11, 11, 10, 11,
> C ICEP 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
> * 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 11, 11, 11, 10, 11,
> C 196 197 198 199 200
> * 11, 11, 11, 11, 10,
> C ICEP = 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
> * 11, 10, 11, 11, 11, 11, 10, 11, 11, 11, 10, 10, 11, 11, 10,
> C 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
> * 11, 11, 11, 11, 10, 10, 10, 10, 11, 10, 10, 10, 10, 11, 11,
> C 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
> * 11, 11, 11, 11, 11, 10, 11, 10, 10, 10, 11, 11, 11, 11, 10,
> C 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
> * 11, 11, 11, 10, 11, 11, 10, 10, 10, 11, 11, 11, 11, 11, 11,
> C 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
> * 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11,
> C 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290
> * 10, 11, 10, 10, 10, 10, 10, 11, 11, 10, 11, 11, 11, 10, 11,
> C 291 292 293 294 295 296 297 298 299 300
> * 11, 11, 11, 10, 10, 10, 10, 10, 10, 10,
> C 301 302 303 304 305 306 307 308 309 310
> * 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
> C 311 312 313 314 315 316 317 318 319 320
> * 11, 11, 11, 11, 11, 10, 10, 10, 10, 10,
> C 321 322 323 324 325 326 327 328 329 330
> * 10, 10, 10, 10, 10, 10, 10, 10, 11, 11,
> C 331 332 333 334 335 336 337 338 339 340
> * 10, 10, 11, 11, 11, 11, 10, 10, 10, 10,
> C 341 342 343 344 345 346 347 348 349 350
> * 11, 11, 11, 11, 10, 11, 11, 11, 10, 10 /

Does regular Fortran allow 35 lines of continuation lines in a data
statement ?

Thanks,
Lynn

Re: is there a better way to code this ?

<cc837c3c-554e-4bf2-91fc-e7879992070dn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2364&group=comp.lang.fortran#2364

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:3cd:b0:305:321b:c870 with SMTP id k13-20020a05622a03cd00b00305321bc870mr1545642qtx.190.1655154526716;
Mon, 13 Jun 2022 14:08:46 -0700 (PDT)
X-Received: by 2002:a25:8281:0:b0:663:287e:659d with SMTP id
r1-20020a258281000000b00663287e659dmr1482249ybk.522.1655154526495; Mon, 13
Jun 2022 14:08:46 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Mon, 13 Jun 2022 14:08:46 -0700 (PDT)
In-Reply-To: <t886bm$8cq$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=115.189.131.81; posting-account=KnYfEgoAAAD1tUJTvdAUZ3XojNa5tezZ
NNTP-Posting-Host: 115.189.131.81
References: <t85qc4$kr5$1@dont-email.me> <375bab02-f98a-464e-aac0-b14c2e39a842n@googlegroups.com>
<t886bm$8cq$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cc837c3c-554e-4bf2-91fc-e7879992070dn@googlegroups.com>
Subject: Re: is there a better way to code this ?
From: harperjf2@gmail.com (jfh)
Injection-Date: Mon, 13 Jun 2022 21:08:46 +0000
Content-Type: text/plain; charset="UTF-8"
 by: jfh - Mon, 13 Jun 2022 21:08 UTC

On Tuesday, June 14, 2022 at 8:23:22 AM UTC+12, Lynn McGuire wrote:
> On 6/12/2022 9:06 PM, gah4 wrote:
> > C CHECK THE COMMANDS WHICH SHOULD HAVE EQUAL SIGN
> > C 10 - no equal sign required
> > C 11 - equal sign required
> >
> > integer needs(350)
> > data needs/
> > C ICEP = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
> > * 10, 11, 11, 10, 10, 11, 11, 11, 10, 11, 10, 11, 11, 10, 10,
> > C ICEP = 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
> > * 10, 10, 11, 11, 11, 10, 10, 10, 10, 11, 10, 11, 11, 11, 11,
> > C ICEP = 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
> > * 11, 10, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 11,
> > C ICEP = 46 47 48 79 50
> > * 10, 11, 11, 11, 11,
> > C ICEP = 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
> > * 10, 10, 11, 11, 10, 11, 11, 10, 11, 11, 10, 11, 10, 11, 11,
> > C ICEP = 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
> > * 11, 10, 10, 11, 10, 11, 11, 10, 11, 11, 11, 11, 11, 11, 11,
> > C ICEP 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
> > * 11, 11, 10, 10, 11, 11, 11, 11, 11, 10, 10, 10, 10, 11, 11,
> > C ICEP 96 97 98 99 100
> > * 11, 10, 10, 11, 11,
> > C ICEP = 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
> > * 11, 10, 10, 10, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10,
> > C ICEP 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
> > * 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
> > C ICEP 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
> > * 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11,
> > C ICEP 146 147 148 149 150
> > * 11, 10, 11, 11, 11,
> > C ICEP = 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
> > * 10, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 11, 10, 11,
> > C ICEP 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
> > * 11, 10, 10, 10, 10, 10, 10, 10, 11, 10, 11, 11, 11, 10, 11,
> > C ICEP 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
> > * 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 11, 11, 11, 10, 11,
> > C 196 197 198 199 200
> > * 11, 11, 11, 11, 10,
> > C ICEP = 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
> > * 11, 10, 11, 11, 11, 11, 10, 11, 11, 11, 10, 10, 11, 11, 10,
> > C 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
> > * 11, 11, 11, 11, 10, 10, 10, 10, 11, 10, 10, 10, 10, 11, 11,
> > C 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
> > * 11, 11, 11, 11, 11, 10, 11, 10, 10, 10, 11, 11, 11, 11, 10,
> > C 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
> > * 11, 11, 11, 10, 11, 11, 10, 10, 10, 11, 11, 11, 11, 11, 11,
> > C 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
> > * 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11,
> > C 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290
> > * 10, 11, 10, 10, 10, 10, 10, 11, 11, 10, 11, 11, 11, 10, 11,
> > C 291 292 293 294 295 296 297 298 299 300
> > * 11, 11, 11, 10, 10, 10, 10, 10, 10, 10,
> > C 301 302 303 304 305 306 307 308 309 310
> > * 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
> > C 311 312 313 314 315 316 317 318 319 320
> > * 11, 11, 11, 11, 11, 10, 10, 10, 10, 10,
> > C 321 322 323 324 325 326 327 328 329 330
> > * 10, 10, 10, 10, 10, 10, 10, 10, 11, 11,
> > C 331 332 333 334 335 336 337 338 339 340
> > * 10, 10, 11, 11, 11, 11, 10, 10, 10, 10,
> > C 341 342 343 344 345 346 347 348 349 350
> > * 11, 11, 11, 11, 10, 11, 11, 11, 10, 10 /
> Does regular Fortran allow 35 lines of continuation lines in a data
> statement ?
>
> Thanks,
> Lynn

Depends on what you mean by regular Fortran. In f2003 and later the limit is 255, but in f95 it's 39 in free form, 19 in fixed form.

Re: is there a better way to code this ?

<99956017-1498-4d1f-b88a-14623c90f5b3n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2369&group=comp.lang.fortran#2369

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:2403:b0:6a7:65f4:211c with SMTP id d3-20020a05620a240300b006a765f4211cmr1994514qkn.462.1655162922126;
Mon, 13 Jun 2022 16:28:42 -0700 (PDT)
X-Received: by 2002:a25:cc4e:0:b0:65c:854b:c111 with SMTP id
l75-20020a25cc4e000000b0065c854bc111mr2161892ybf.218.1655162921836; Mon, 13
Jun 2022 16:28:41 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Mon, 13 Jun 2022 16:28:41 -0700 (PDT)
In-Reply-To: <t886bm$8cq$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:80fd:94fa:6e99:975f;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:80fd:94fa:6e99:975f
References: <t85qc4$kr5$1@dont-email.me> <375bab02-f98a-464e-aac0-b14c2e39a842n@googlegroups.com>
<t886bm$8cq$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <99956017-1498-4d1f-b88a-14623c90f5b3n@googlegroups.com>
Subject: Re: is there a better way to code this ?
From: gah4@u.washington.edu (gah4)
Injection-Date: Mon, 13 Jun 2022 23:28:42 +0000
Content-Type: text/plain; charset="UTF-8"
 by: gah4 - Mon, 13 Jun 2022 23:28 UTC

On Monday, June 13, 2022 at 1:23:22 PM UTC-7, Lynn McGuire wrote:
> On 6/12/2022 9:06 PM, gah4 wrote:
> > C CHECK THE COMMANDS WHICH SHOULD HAVE EQUAL SIGN
> > C 10 - no equal sign required
> > C 11 - equal sign required
> >
> > integer needs(350)
> > data needs/
> > C ICEP = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
> > * 10, 11, 11, 10, 10, 11, 11, 11, 10, 11, 10, 11, 11, 10, 10,

(snip)

> > * 11, 11, 11, 11, 10, 11, 11, 11, 10, 10 /\
> Does regular Fortran allow 35 lines of continuation lines in a data
> statement ?

I don't think it is less than for a computed GOTO statement.

As well as I remember, some compilers have a larger limit for DATA,
as it is useful for initializing large arrays.

Re: is there a better way to code this ?

<t88h8a$r78$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2370&group=comp.lang.fortran#2370

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran
Subject: Re: is there a better way to code this ?
Date: Mon, 13 Jun 2022 18:29:14 -0500
Organization: A noiseless patient Spider
Lines: 78
Message-ID: <t88h8a$r78$1@dont-email.me>
References: <t85qc4$kr5$1@dont-email.me>
<375bab02-f98a-464e-aac0-b14c2e39a842n@googlegroups.com>
<t886bm$8cq$1@dont-email.me>
<cc837c3c-554e-4bf2-91fc-e7879992070dn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 13 Jun 2022 23:29:14 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="4dc80248f72e00d611a616b8ebcd3369";
logging-data="27880"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19n2N12/uct2TZkUfBgJfx8"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:LzlFi8aL6PAVQO9O+zlixwo5drA=
In-Reply-To: <cc837c3c-554e-4bf2-91fc-e7879992070dn@googlegroups.com>
Content-Language: en-US
 by: Lynn McGuire - Mon, 13 Jun 2022 23:29 UTC

On 6/13/2022 4:08 PM, jfh wrote:
> On Tuesday, June 14, 2022 at 8:23:22 AM UTC+12, Lynn McGuire wrote:
>> On 6/12/2022 9:06 PM, gah4 wrote:
>>> C CHECK THE COMMANDS WHICH SHOULD HAVE EQUAL SIGN
>>> C 10 - no equal sign required
>>> C 11 - equal sign required
>>>
>>> integer needs(350)
>>> data needs/
>>> C ICEP = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
>>> * 10, 11, 11, 10, 10, 11, 11, 11, 10, 11, 10, 11, 11, 10, 10,
>>> C ICEP = 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
>>> * 10, 10, 11, 11, 11, 10, 10, 10, 10, 11, 10, 11, 11, 11, 11,
>>> C ICEP = 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
>>> * 11, 10, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 11,
>>> C ICEP = 46 47 48 79 50
>>> * 10, 11, 11, 11, 11,
>>> C ICEP = 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
>>> * 10, 10, 11, 11, 10, 11, 11, 10, 11, 11, 10, 11, 10, 11, 11,
>>> C ICEP = 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
>>> * 11, 10, 10, 11, 10, 11, 11, 10, 11, 11, 11, 11, 11, 11, 11,
>>> C ICEP 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
>>> * 11, 11, 10, 10, 11, 11, 11, 11, 11, 10, 10, 10, 10, 11, 11,
>>> C ICEP 96 97 98 99 100
>>> * 11, 10, 10, 11, 11,
>>> C ICEP = 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
>>> * 11, 10, 10, 10, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10,
>>> C ICEP 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
>>> * 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
>>> C ICEP 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
>>> * 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11,
>>> C ICEP 146 147 148 149 150
>>> * 11, 10, 11, 11, 11,
>>> C ICEP = 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
>>> * 10, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 11, 10, 11,
>>> C ICEP 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
>>> * 11, 10, 10, 10, 10, 10, 10, 10, 11, 10, 11, 11, 11, 10, 11,
>>> C ICEP 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
>>> * 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 11, 11, 11, 10, 11,
>>> C 196 197 198 199 200
>>> * 11, 11, 11, 11, 10,
>>> C ICEP = 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
>>> * 11, 10, 11, 11, 11, 11, 10, 11, 11, 11, 10, 10, 11, 11, 10,
>>> C 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
>>> * 11, 11, 11, 11, 10, 10, 10, 10, 11, 10, 10, 10, 10, 11, 11,
>>> C 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
>>> * 11, 11, 11, 11, 11, 10, 11, 10, 10, 10, 11, 11, 11, 11, 10,
>>> C 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
>>> * 11, 11, 11, 10, 11, 11, 10, 10, 10, 11, 11, 11, 11, 11, 11,
>>> C 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
>>> * 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11,
>>> C 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290
>>> * 10, 11, 10, 10, 10, 10, 10, 11, 11, 10, 11, 11, 11, 10, 11,
>>> C 291 292 293 294 295 296 297 298 299 300
>>> * 11, 11, 11, 10, 10, 10, 10, 10, 10, 10,
>>> C 301 302 303 304 305 306 307 308 309 310
>>> * 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
>>> C 311 312 313 314 315 316 317 318 319 320
>>> * 11, 11, 11, 11, 11, 10, 10, 10, 10, 10,
>>> C 321 322 323 324 325 326 327 328 329 330
>>> * 10, 10, 10, 10, 10, 10, 10, 10, 11, 11,
>>> C 331 332 333 334 335 336 337 338 339 340
>>> * 10, 10, 11, 11, 11, 11, 10, 10, 10, 10,
>>> C 341 342 343 344 345 346 347 348 349 350
>>> * 11, 11, 11, 11, 10, 11, 11, 11, 10, 10 /
>> Does regular Fortran allow 35 lines of continuation lines in a data
>> statement ?
>>
>> Thanks,
>> Lynn
>
> Depends on what you mean by regular Fortran. In f2003 and later the limit is 255, but in f95 it's 39 in free form, 19 in fixed form.

I meant Standard Fortran.

Thanks !

Lynn

Re: is there a better way to code this ?

<44bb0892-1c9e-49a1-997a-1adb1068eb77n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2371&group=comp.lang.fortran#2371

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:58c:b0:305:79a:f53 with SMTP id c12-20020a05622a058c00b00305079a0f53mr2139627qtb.601.1655165990373;
Mon, 13 Jun 2022 17:19:50 -0700 (PDT)
X-Received: by 2002:a81:d10:0:b0:313:b540:71d0 with SMTP id
16-20020a810d10000000b00313b54071d0mr2714733ywn.288.1655165990221; Mon, 13
Jun 2022 17:19:50 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Mon, 13 Jun 2022 17:19:50 -0700 (PDT)
In-Reply-To: <t88h8a$r78$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:80fd:94fa:6e99:975f;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:80fd:94fa:6e99:975f
References: <t85qc4$kr5$1@dont-email.me> <375bab02-f98a-464e-aac0-b14c2e39a842n@googlegroups.com>
<t886bm$8cq$1@dont-email.me> <cc837c3c-554e-4bf2-91fc-e7879992070dn@googlegroups.com>
<t88h8a$r78$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <44bb0892-1c9e-49a1-997a-1adb1068eb77n@googlegroups.com>
Subject: Re: is there a better way to code this ?
From: gah4@u.washington.edu (gah4)
Injection-Date: Tue, 14 Jun 2022 00:19:50 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1690
 by: gah4 - Tue, 14 Jun 2022 00:19 UTC

On Monday, June 13, 2022 at 4:29:18 PM UTC-7, Lynn McGuire wrote:

(snip)

> > Depends on what you mean by regular Fortran. In f2003 and later the limit is 255, but in f95 it's 39 in free form, 19 in fixed form.
> I meant Standard Fortran.

66, 77, 90, 95, 2008, 2013, or 2018?

There is a famous quote:

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

Re: is there a better way to code this ?

<t8ans4$dnt$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2377&group=comp.lang.fortran#2377

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran
Subject: Re: is there a better way to code this ?
Date: Tue, 14 Jun 2022 14:34:25 -0500
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <t8ans4$dnt$1@dont-email.me>
References: <t85qc4$kr5$1@dont-email.me>
<375bab02-f98a-464e-aac0-b14c2e39a842n@googlegroups.com>
<t886bm$8cq$1@dont-email.me>
<cc837c3c-554e-4bf2-91fc-e7879992070dn@googlegroups.com>
<t88h8a$r78$1@dont-email.me>
<44bb0892-1c9e-49a1-997a-1adb1068eb77n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 14 Jun 2022 19:34:28 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="4dc80248f72e00d611a616b8ebcd3369";
logging-data="14077"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+8TSTJKSXXCvVT9izeeQ8N"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:dKlyTSzPglL9KRHdcIqsKIMcWp8=
In-Reply-To: <44bb0892-1c9e-49a1-997a-1adb1068eb77n@googlegroups.com>
Content-Language: en-US
 by: Lynn McGuire - Tue, 14 Jun 2022 19:34 UTC

On 6/13/2022 7:19 PM, gah4 wrote:
> On Monday, June 13, 2022 at 4:29:18 PM UTC-7, Lynn McGuire wrote:
>
> (snip)
>
>>> Depends on what you mean by regular Fortran. In f2003 and later the limit is 255, but in f95 it's 39 in free form, 19 in fixed form.
>> I meant Standard Fortran.
>
> 66, 77, 90, 95, 2008, 2013, or 2018?
>
> There is a famous quote:
>
> "The nice thing about standards is that we have so many to choose from."

Heh.

F77 apparently allowed 19 continuation lines. Open Watcom Fortran 77 is
extended to allow up to 61 continuation lines.

Lynn

Re: is there a better way to code this ?

<3e04e619-c1cd-449a-bb0c-1256582e91cdn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2378&group=comp.lang.fortran#2378

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ac8:5e07:0:b0:305:2d2e:5bd9 with SMTP id h7-20020ac85e07000000b003052d2e5bd9mr5934669qtx.537.1655238146028;
Tue, 14 Jun 2022 13:22:26 -0700 (PDT)
X-Received: by 2002:a81:1341:0:b0:30c:3a7e:65e9 with SMTP id
62-20020a811341000000b0030c3a7e65e9mr7812759ywt.7.1655238145875; Tue, 14 Jun
2022 13:22:25 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Tue, 14 Jun 2022 13:22:25 -0700 (PDT)
In-Reply-To: <t8ans4$dnt$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:c024:a2e6:2f6f:28a4;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:c024:a2e6:2f6f:28a4
References: <t85qc4$kr5$1@dont-email.me> <375bab02-f98a-464e-aac0-b14c2e39a842n@googlegroups.com>
<t886bm$8cq$1@dont-email.me> <cc837c3c-554e-4bf2-91fc-e7879992070dn@googlegroups.com>
<t88h8a$r78$1@dont-email.me> <44bb0892-1c9e-49a1-997a-1adb1068eb77n@googlegroups.com>
<t8ans4$dnt$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3e04e619-c1cd-449a-bb0c-1256582e91cdn@googlegroups.com>
Subject: Re: is there a better way to code this ?
From: gah4@u.washington.edu (gah4)
Injection-Date: Tue, 14 Jun 2022 20:22:26 +0000
Content-Type: text/plain; charset="UTF-8"
 by: gah4 - Tue, 14 Jun 2022 20:22 UTC

On Tuesday, June 14, 2022 at 12:34:32 PM UTC-7, Lynn McGuire wrote:

(snip)

> F77 apparently allowed 19 continuation lines. Open Watcom Fortran 77 is
> extended to allow up to 61 continuation lines.

When I wrote above about how many lines of computed GOTO, I had forgotten
that you split that one up.

You could split up the DATA with EQUIVALENCE and two or three or four arrays.

I thought that was a good way, as it keeps your comments (which don't count
for continuation lines), but also the numbers. So no transcribing mistakes.
(Not that you ever do that.)

And yes the Watcom compiler is my favorite Fortran 77 compiler.
(Well, maybe VS Fortran, but I don't have one of those.)

Re: is there a better way to code this ?

<t8b19q$h9i$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2379&group=comp.lang.fortran#2379

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran
Subject: Re: is there a better way to code this ?
Date: Tue, 14 Jun 2022 17:15:22 -0500
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <t8b19q$h9i$1@dont-email.me>
References: <t85qc4$kr5$1@dont-email.me>
<375bab02-f98a-464e-aac0-b14c2e39a842n@googlegroups.com>
<t886bm$8cq$1@dont-email.me>
<cc837c3c-554e-4bf2-91fc-e7879992070dn@googlegroups.com>
<t88h8a$r78$1@dont-email.me>
<44bb0892-1c9e-49a1-997a-1adb1068eb77n@googlegroups.com>
<t8ans4$dnt$1@dont-email.me>
<3e04e619-c1cd-449a-bb0c-1256582e91cdn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 14 Jun 2022 22:15:22 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="174ce04f4938a11594b534e61f2126c4";
logging-data="17714"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX189Qzn3lMOudnt3o3f4jC5+"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:0MPLm8FalFJE1R6gSXr3zRsV8dg=
In-Reply-To: <3e04e619-c1cd-449a-bb0c-1256582e91cdn@googlegroups.com>
Content-Language: en-US
 by: Lynn McGuire - Tue, 14 Jun 2022 22:15 UTC

On 6/14/2022 3:22 PM, gah4 wrote:
> On Tuesday, June 14, 2022 at 12:34:32 PM UTC-7, Lynn McGuire wrote:
>
> (snip)
>
>> F77 apparently allowed 19 continuation lines. Open Watcom Fortran 77 is
>> extended to allow up to 61 continuation lines.
>
> When I wrote above about how many lines of computed GOTO, I had forgotten
> that you split that one up.
>
> You could split up the DATA with EQUIVALENCE and two or three or four arrays.
>
> I thought that was a good way, as it keeps your comments (which don't count
> for continuation lines), but also the numbers. So no transcribing mistakes.
> (Not that you ever do that.)
>
> And yes the Watcom compiler is my favorite Fortran 77 compiler.
> (Well, maybe VS Fortran, but I don't have one of those.)

I am slowly porting to Intel Fortran on Windows. I have got to go 64
bit. I may have to turn off the automatic module creation for now to
speed up my port. 5,000 subroutines is a lot of arguments to fix to
meet the exact type used.

Lynn

Re: is there a better way to code this ?

<t8b1f3$h9i$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2380&group=comp.lang.fortran#2380

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran
Subject: Re: is there a better way to code this ?
Date: Tue, 14 Jun 2022 17:18:11 -0500
Organization: A noiseless patient Spider
Lines: 118
Message-ID: <t8b1f3$h9i$2@dont-email.me>
References: <t85qc4$kr5$1@dont-email.me>
<375bab02-f98a-464e-aac0-b14c2e39a842n@googlegroups.com>
<t886bm$8cq$1@dont-email.me>
<cc837c3c-554e-4bf2-91fc-e7879992070dn@googlegroups.com>
<t88h8a$r78$1@dont-email.me>
<44bb0892-1c9e-49a1-997a-1adb1068eb77n@googlegroups.com>
<t8ans4$dnt$1@dont-email.me>
<3e04e619-c1cd-449a-bb0c-1256582e91cdn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 14 Jun 2022 22:18:11 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="174ce04f4938a11594b534e61f2126c4";
logging-data="17714"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/txQICJ7v7kQIOqIKgRo7f"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:gS7kLTOwrX6EKlMeXVZKr+sYCaE=
In-Reply-To: <3e04e619-c1cd-449a-bb0c-1256582e91cdn@googlegroups.com>
Content-Language: en-US
 by: Lynn McGuire - Tue, 14 Jun 2022 22:18 UTC

On 6/14/2022 3:22 PM, gah4 wrote:
> On Tuesday, June 14, 2022 at 12:34:32 PM UTC-7, Lynn McGuire wrote:
>
> (snip)
>
>> F77 apparently allowed 19 continuation lines. Open Watcom Fortran 77 is
>> extended to allow up to 61 continuation lines.
>
> When I wrote above about how many lines of computed GOTO, I had forgotten
> that you split that one up.
>
> You could split up the DATA with EQUIVALENCE and two or three or four arrays.
>
> I thought that was a good way, as it keeps your comments (which don't count
> for continuation lines), but also the numbers. So no transcribing mistakes.
> (Not that you ever do that.)
>
> And yes the Watcom compiler is my favorite Fortran 77 compiler.
> (Well, maybe VS Fortran, but I don't have one of those.)

I also have this computed goto that is going be even harder:

IF (ICEP .EQ. -1) GO TO 562
IF (ICEP .GT. 100) GO TO 283
C ICEP 1 2 3 4 5 6 7 8 9 10
GO TO (900 ,510 ,510 ,580 ,564 ,900 ,636 ,518 ,564 ,514 ,
C ICEP 11 12 13 14 15 16 17 18 19 20
* 564 ,530 ,677 ,580 ,564 ,564 ,580 ,668 ,900 ,668 ,
C 21 22 23 24 25 26 27 28 29 30
* 564 ,580 ,900 ,580 ,562 ,564 ,620 ,513 ,510 ,900 ,
C 31 32 33 34 35 36 37 38 39 40
* 900 ,562 ,514 ,514 ,668 ,514 ,520 ,550 ,604 ,615 ,
C 41 42 43 44 45 46 47 48 49 50
* 564 ,580 ,580 ,403 ,550 ,580 ,514 ,900 ,900 ,521,
C 51 52 53 54 55 56 57 58 59 60
* 564 ,580 ,514 ,668 ,565 ,530 ,530 ,5520, 668 ,517 ,
C 61 62 63 64 65 66 67 68 69 70
* 580 , 668, 580 ,900 ,510 ,519 ,580 ,564 ,550 ,564 ,
C 71 72 73 74 75 76 77 78 79 80
* 500 ,530 ,561 ,510 ,560 ,554 ,530 ,439 ,439 ,604 ,
C 81 82 83 84 85 86 87 88 89 90
* 689 ,510 ,900 ,564 ,689 ,689 ,570 ,668 ,668 ,580 ,
C 91 92 93 94 95 96 97 98 99 100
* 580 ,580 ,580 ,651 ,650 ,651 ,564 ,900 ,522 ,530 ), icep
283 IF(ICEP.GT. 200) GO TO 285
NN = ICEP - 100
C ICEP 101 102 103 104 105 106 107 108 109 110
GO TO (530 ,900 ,511 ,511 ,511 ,674 ,675 ,553 ,553 ,553 ,
C 111 112 113 114 115 116 117 118 119 120
* 553 ,553 ,553 ,553 ,564 ,580 ,551 ,516 ,580 ,580 ,
C 121 122 123 124 125 126 127 128 129 130
* 515 ,564 ,580 ,553 ,564 ,580 ,564 ,580 ,551 ,551 ,
C 131 132 133 134 135 136 137 138 139 140
* 668 ,653 ,653 ,900 ,565 ,568 ,552 ,565 ,571 ,551 ,
C 141 142 143 144 145 146 147 148 149 150
* 553 ,900 ,673 ,900 ,677 ,692 ,680 ,6842,6842,6842,
C 151 152 153 154 155 156 157 158 159 160
* 680 ,760 ,900 ,900 ,751 ,6829,6829,6829,6829,6829,
C 161 162 163 164 165 166 167 168 169 170
* 900 ,900 ,900 ,5630, 16500, 16500, 6829,565 ,569 ,5620,
C 171 172 173 174 175 176 177 178 179 180
* 563 ,564 ,564 ,752 ,753 ,653 ,900 ,900 ,17900, 900,
C 181 182 183 184 185 186 187 188 189 190
* 761 ,762 ,763 ,6840,5525,5631,5662,5663,5664,5665,
C 191 192 193 194 195 196 197 198 199 200
* 5666, 774, 774,5632, 523, 653,6843, 900,6845,6200), NN
285 if (icep .gt. 300) goto 287
NN = ICEP - 200
C ICEP 201 202 203 204 205 206 207 208 209 210
GO TO (6846,6847,6848,6849,6850,6851,6852,6844,6854,6855,
C 211 212 213 214 215 216 217 218 219 220
* 5632,565 , 440, 598,6010, 441, 442, 514, 530, 5633,
C 221 222 223 224 225 226 227 228 229 230
* 580, 564, 553,5634, 580, 564, 580, 564,6361, 596,
C 231 232 233 234 235 236 237 238 239 240
* 597,6364, 900, 900, 900, 553,6020, 580, 564, 553,
C 241 242 243 244 245 246 247 248 249, 250,
* 5635,4389,6030,6030,6040, 692, 692,6100, 5526,900,
C 251 252 253 254 255 256 257 258 259 260
* 510, 580, 564, 553,1255,1256,1257,1258,1259,1260,
C 261 262 263 264 265 266 267 268
* 2261,2262, 1760, 900, 653, 1264, 12641, 12642,
C 269 270 271 272 273 274 275 276
* 12643, 27000, 27100, 27200, 27300, 514, 530, 514,
C 277 278 279 280 281 282 283 284 285
* 530, 5301, 5302, 5303, 5304, 6461, 5560, 12644, 6461,
C 286 287 288 289 290 291 292 293 294
* 28600, 28700, 28800, 28900, 29000, 692, 692, 900, 29400,
C 295 296 297 298 299 300
* 29500, 29600, 29700, 29800, 29900, 30000), nn
287 if (icep .gt. gen_maxcep) goto 289
NN = ICEP - 300
C 301 302 303 304 305 306 307 308
go to (30100, 30200, 30300, 30400, 30500, 30600, 30700, 30800,
C 309 310 311 312 313 314 315 316
* 30900, 31000, 31100, 31200, 31300, 31400, 31500, 31600,
C 317 318 319 320 321 322 323 324
* 31700, 31800, 31900, 32000, 32100, 32200, 32300, 32400,
C 325 326 327 328 329 330 331 332
* 32500, 32600, 32700, 32800, 32900, 33000, 900, 900,
C 333 334 335 336 337 338 339 340
* 33300, 33400, 33500, 33600, 33700, 33800, 33900, 34000,
C 341 342 343 344 345 346 347 348
* 34100, 34200, 34300, 34400, 34500, 34600, 34700, 34800,
C 349 350 351 352 353 354 355 356
* 34900, 35000, 35100, 35200), NN

289 call scrwri (' ')
write (screenbuffer, 99902) icep
99902 format ('ERROR: icep', i4, ' command not handled (ingen2)')
call scrwri (screenbuffer)
call scrwri (' ')
setstp = .true.
GOTO 900

Lynn

Re: is there a better way to code this ?

<t8b76o$9rq$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2381&group=comp.lang.fortran#2381

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: garylscott@sbcglobal.net (Gary Scott)
Newsgroups: comp.lang.fortran
Subject: Re: is there a better way to code this ?
Date: Tue, 14 Jun 2022 18:56:07 -0500
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <t8b76o$9rq$1@dont-email.me>
References: <t85qc4$kr5$1@dont-email.me>
<375bab02-f98a-464e-aac0-b14c2e39a842n@googlegroups.com>
<t886bm$8cq$1@dont-email.me>
<cc837c3c-554e-4bf2-91fc-e7879992070dn@googlegroups.com>
<t88h8a$r78$1@dont-email.me>
<44bb0892-1c9e-49a1-997a-1adb1068eb77n@googlegroups.com>
<t8ans4$dnt$1@dont-email.me>
<3e04e619-c1cd-449a-bb0c-1256582e91cdn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 14 Jun 2022 23:56:08 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="b9276c49e67b43fd54ecaa51f53ee47c";
logging-data="10106"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+L6d9Ofn2thH1D88+6wPv5KhmLgOgpjDY="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:w+wveTwWRaRkUENdlgZE9g76hT8=
In-Reply-To: <3e04e619-c1cd-449a-bb0c-1256582e91cdn@googlegroups.com>
Content-Language: en-US
 by: Gary Scott - Tue, 14 Jun 2022 23:56 UTC

On 6/14/2022 3:22 PM, gah4 wrote:
> On Tuesday, June 14, 2022 at 12:34:32 PM UTC-7, Lynn McGuire wrote:
>
> (snip)
>
>> F77 apparently allowed 19 continuation lines. Open Watcom Fortran 77 is
>> extended to allow up to 61 continuation lines.
>
> When I wrote above about how many lines of computed GOTO, I had forgotten
> that you split that one up.
>
> You could split up the DATA with EQUIVALENCE and two or three or four arrays.
>
> I thought that was a good way, as it keeps your comments (which don't count
> for continuation lines), but also the numbers. So no transcribing mistakes.
> (Not that you ever do that.)
>
> And yes the Watcom compiler is my favorite Fortran 77 compiler.
> (Well, maybe VS Fortran, but I don't have one of those.)
>
>
>
VS Fortran was one of my favs. I wrote lots of tools including one
giant interactive graphics editing program that rivaled out Mentor
Graphics workstations. Of course you had to have a graphics capable
high function terminal (3270PC AT/GX) for it to work well, but lesser
capable graphics terminals also worked where I could think of a workaround.

Re: is there a better way to code this ?

<5edeb7b0-cf88-4bd7-afb1-7c082f7342cbn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2383&group=comp.lang.fortran#2383

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:29ec:b0:46d:82b5:b02f with SMTP id jv12-20020a05621429ec00b0046d82b5b02fmr6377762qvb.118.1655261138784;
Tue, 14 Jun 2022 19:45:38 -0700 (PDT)
X-Received: by 2002:a5b:489:0:b0:655:be22:4757 with SMTP id
n9-20020a5b0489000000b00655be224757mr8010645ybp.92.1655261138630; Tue, 14 Jun
2022 19:45:38 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Tue, 14 Jun 2022 19:45:38 -0700 (PDT)
In-Reply-To: <t8b1f3$h9i$2@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:29fc:e38a:281a:7a71;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:29fc:e38a:281a:7a71
References: <t85qc4$kr5$1@dont-email.me> <375bab02-f98a-464e-aac0-b14c2e39a842n@googlegroups.com>
<t886bm$8cq$1@dont-email.me> <cc837c3c-554e-4bf2-91fc-e7879992070dn@googlegroups.com>
<t88h8a$r78$1@dont-email.me> <44bb0892-1c9e-49a1-997a-1adb1068eb77n@googlegroups.com>
<t8ans4$dnt$1@dont-email.me> <3e04e619-c1cd-449a-bb0c-1256582e91cdn@googlegroups.com>
<t8b1f3$h9i$2@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5edeb7b0-cf88-4bd7-afb1-7c082f7342cbn@googlegroups.com>
Subject: Re: is there a better way to code this ?
From: gah4@u.washington.edu (gah4)
Injection-Date: Wed, 15 Jun 2022 02:45:38 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2630
 by: gah4 - Wed, 15 Jun 2022 02:45 UTC

On Tuesday, June 14, 2022 at 3:18:15 PM UTC-7, Lynn McGuire wrote:

(snip)

> I also have this computed goto that is going be even harder:
> IF (ICEP .EQ. -1) GO TO 562
> IF (ICEP .GT. 100) GO TO 283
> C ICEP 1 2 3 4 5 6 7 8 9 10
> GO TO (900 ,510 ,510 ,580 ,564 ,900 ,636 ,518 ,564 ,514 ,
> C ICEP 11 12 13 14 15 16 17 18 19 20
> * 564 ,530 ,677 ,580 ,564 ,564 ,580 ,668 ,900 ,668 ,
> C 21 22 23 24 25 26 27 28 29 30
> * 564 ,580 ,900 ,580 ,562 ,564 ,620 ,513 ,510 ,900 ,
> C 31 32 33 34 35 36 37 38 39 40
> * 900 ,562 ,514 ,514 ,668 ,514 ,520 ,550 ,604 ,615 ,

(snip)

OK, this one has 190 different places to go.

Are these places more complicated than assigning some value,
or something else that can be done using lookup table data?

This is sort of close to the point that you could use a look up
table and 190 way computed GOTO statement. I might suggest
that when it is less than about 1/3 of the choices.

Using AWK:

/^[^C]/ {
gsub("[^0-9]"," ")
if(NF<4) next
for(i=1; i<=NF; i++) x[$i]++
}

END {
j=l=0
for(k in x) j++
for(k in x) l += x[k]
print j,"of",l
}

Re: is there a better way to code this ?

<t8bn4s$7rd$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2384&group=comp.lang.fortran#2384

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran
Subject: Re: is there a better way to code this ?
Date: Tue, 14 Jun 2022 23:28:12 -0500
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <t8bn4s$7rd$1@dont-email.me>
References: <t85qc4$kr5$1@dont-email.me>
<375bab02-f98a-464e-aac0-b14c2e39a842n@googlegroups.com>
<t886bm$8cq$1@dont-email.me>
<cc837c3c-554e-4bf2-91fc-e7879992070dn@googlegroups.com>
<t88h8a$r78$1@dont-email.me>
<44bb0892-1c9e-49a1-997a-1adb1068eb77n@googlegroups.com>
<t8ans4$dnt$1@dont-email.me>
<3e04e619-c1cd-449a-bb0c-1256582e91cdn@googlegroups.com>
<t8b1f3$h9i$2@dont-email.me>
<5edeb7b0-cf88-4bd7-afb1-7c082f7342cbn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 15 Jun 2022 04:28:12 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="174ce04f4938a11594b534e61f2126c4";
logging-data="8045"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18rEAro0Y8EWhO1BUdj5qR3"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:LWw2XbHip+HeBYWl3PF5TyRHsOo=
In-Reply-To: <5edeb7b0-cf88-4bd7-afb1-7c082f7342cbn@googlegroups.com>
Content-Language: en-US
 by: Lynn McGuire - Wed, 15 Jun 2022 04:28 UTC

On 6/14/2022 9:45 PM, gah4 wrote:
> On Tuesday, June 14, 2022 at 3:18:15 PM UTC-7, Lynn McGuire wrote:
>
> (snip)
>
>> I also have this computed goto that is going be even harder:
>
>> IF (ICEP .EQ. -1) GO TO 562
>> IF (ICEP .GT. 100) GO TO 283
>> C ICEP 1 2 3 4 5 6 7 8 9 10
>> GO TO (900 ,510 ,510 ,580 ,564 ,900 ,636 ,518 ,564 ,514 ,
>> C ICEP 11 12 13 14 15 16 17 18 19 20
>> * 564 ,530 ,677 ,580 ,564 ,564 ,580 ,668 ,900 ,668 ,
>> C 21 22 23 24 25 26 27 28 29 30
>> * 564 ,580 ,900 ,580 ,562 ,564 ,620 ,513 ,510 ,900 ,
>> C 31 32 33 34 35 36 37 38 39 40
>> * 900 ,562 ,514 ,514 ,668 ,514 ,520 ,550 ,604 ,615 ,
>
> (snip)
>
> OK, this one has 190 different places to go.
>
> Are these places more complicated than assigning some value,
> or something else that can be done using lookup table data?
>
> This is sort of close to the point that you could use a look up
> table and 190 way computed GOTO statement. I might suggest
> that when it is less than about 1/3 of the choices.
>
> Using AWK:
>
> /^[^C]/ {
> gsub("[^0-9]"," ")
> if(NF<4) next
> for(i=1; i<=NF; i++) x[$i]++
> }
>
> END {
> j=l=0
> for(k in x) j++
> for(k in x) l += x[k]
> print j,"of",l
> }

It is truly spaghetti code. A value assignment and hundreds of gotos.
It has grown like topsy over the years. Probably a SELECT would work well.

Lynn

Re: is there a better way to code this ?

<t8caqt$5so$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2385&group=comp.lang.fortran#2385

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!lfsn+8Y8XPk4JuCDnArrSA.user.46.165.242.91.POSTED!not-for-mail
From: drikosev@gmail.com (Ev. Drikos)
Newsgroups: comp.lang.fortran
Subject: Re: is there a better way to code this ?
Date: Wed, 15 Jun 2022 13:04:13 +0300
Organization: Aioe.org NNTP Server
Message-ID: <t8caqt$5so$1@gioia.aioe.org>
References: <t85qc4$kr5$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="6040"; posting-host="lfsn+8Y8XPk4JuCDnArrSA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.5.1
Content-Language: en-US
X-Mozilla-News-Host: news://news.aioe.org
X-Notice: Filtered by postfilter v. 0.9.2
 by: Ev. Drikos - Wed, 15 Jun 2022 10:04 UTC

On 13/06/2022 01:46, Lynn McGuire wrote:
> So, is there a better way to code this ?
>

Better no, maybe more compact. If performance is an
issue one can declare ie the string as a parameter.

---------------- icep.f90 -----------------------------
! CHECK THE COMMANDS WHICH SHOULD HAVE EQUAL SIGN
! 10 - no equal sign required
! 11 - equal sign required

interface
function atoi(in) bind(c)
use, intrinsic :: iso_c_binding
integer(c_int) :: atoi
character(c_char) :: in(*)
end function
end interface

character(350) :: go
character :: ch
integer :: icep = 314 !ie
integer :: nn

!234567890123456789012345678901234567890123456789012345678901234567890xx
go(001:052)='1212121212121212121212121212121212121212121121212112'
go(053:104)='1212121212121212121212121212121212121212121121212112'
go(105:156)='1212121212121212121212121212121212121212121121212112'
go(157:208)='1212121212121212121212121212121212121212121121212112'
go(209:260)='1212121212121212121212121212121212121212121121212112'
go(261:312)='1212121212121212121212121212121212121212121121212112'
go(313:350)='12121212121212121212121212121212121212'

ch=go(icep:icep)
nn=atoi(ch)

print *, 'ch=', ch
print *, 'nn=', nn
print *, 'go=', go

goto(10,11) nn

10 print *, '10', 'go=', go(icep:icep)
goto 999
11 print *, '11', 'go=', go(icep:icep)
goto 999
999 end

Re: is there a better way to code this ?

<46693e8b-7193-4338-847e-da37f2228f21n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2386&group=comp.lang.fortran#2386

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ad4:4ee5:0:b0:46d:f1:9d6c with SMTP id dv5-20020ad44ee5000000b0046d00f19d6cmr7523753qvb.87.1655295892664;
Wed, 15 Jun 2022 05:24:52 -0700 (PDT)
X-Received: by 2002:a81:52c4:0:b0:30c:5a3b:6537 with SMTP id
g187-20020a8152c4000000b0030c5a3b6537mr11481458ywb.5.1655295892498; Wed, 15
Jun 2022 05:24:52 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Wed, 15 Jun 2022 05:24:52 -0700 (PDT)
In-Reply-To: <t85qc4$kr5$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=202.67.103.232; posting-account=S_MdrwoAAAD7T2pxG2e393dk6y0tc0Le
NNTP-Posting-Host: 202.67.103.232
References: <t85qc4$kr5$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <46693e8b-7193-4338-847e-da37f2228f21n@googlegroups.com>
Subject: Re: is there a better way to code this ?
From: robin.vowels@gmail.com (Robin Vowels)
Injection-Date: Wed, 15 Jun 2022 12:24:52 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Robin Vowels - Wed, 15 Jun 2022 12:24 UTC

On Monday, June 13, 2022 at 8:46:32 AM UTC+10, Lynn McGuire wrote:
> So, is there a better way to code this ?
..
Yes, in PL/I you need to write only GO TO LAB(NN);
..
> C CHECK THE COMMANDS WHICH SHOULD HAVE EQUAL SIGN
> C 10 - no equal sign required
> C 11 - equal sign required
> C
> LEQUL=.TRUE.
> IF (ICEP .GT. 100) GO TO 1002
> C ICEP = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
> GO TO( 10, 11, 11, 10, 10, 11, 11, 11, 10, 11, 10, 11, 11, 10, 10,
> C ICEP = 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
> * 10, 10, 11, 11, 11, 10, 10, 10, 10, 11, 10, 11, 11, 11, 11,
> C ICEP = 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
> * 11, 10, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 11,
> C ICEP = 46 47 48 79 50
> * 10, 11, 11, 11, 11,
> C ICEP = 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
> * 10, 10, 11, 11, 10, 11, 11, 10, 11, 11, 10, 11, 10, 11, 11,
> C ICEP = 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
> * 11, 10, 10, 11, 10, 11, 11, 10, 11, 11, 11, 11, 11, 11, 11,
> C ICEP 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
> * 11, 11, 10, 10, 11, 11, 11, 11, 11, 10, 10, 10, 10, 11, 11,
> C ICEP 96 97 98 99 100
> * 11, 10, 10, 11, 11), icep
> 1002 IF (ICEP .GT. 200) GO TO 1004
> NN = ICEP - 100
> C ICEP = 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
> GO TO( 11, 10, 10, 10, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10,
> C ICEP 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
> * 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
> C ICEP 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
> * 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11,
> C ICEP 146 147 148 149 150
> * 11, 10, 11, 11, 11,
> C ICEP = 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
> * 10, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 11, 10, 11,
> C ICEP 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
> * 11, 10, 10, 10, 10, 10, 10, 10, 11, 10, 11, 11, 11, 10, 11,
> C ICEP 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
> * 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 11, 11, 11, 10, 11,
> C 196 197 198 199 200
> * 11, 11, 11, 11, 10), NN
> 1004 IF (ICEP .GT. 300) goto 1006
> NN = ICEP - 200
> C ICEP = 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
> GO TO( 11, 10, 11, 11, 11, 11, 10, 11, 11, 11, 10, 10, 11, 11, 10,
> C 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
> * 11, 11, 11, 11, 10, 10, 10, 10, 11, 10, 10, 10, 10, 11, 11,
> C 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
> * 11, 11, 11, 11, 11, 10, 11, 10, 10, 10, 11, 11, 11, 11, 10,
> C 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
> * 11, 11, 11, 10, 11, 11, 10, 10, 10, 11, 11, 11, 11, 11, 11,
> C 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
> * 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11,
> C 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290
> * 10, 11, 10, 10, 10, 10, 10, 11, 11, 10, 11, 11, 11, 10, 11,
> C 291 292 293 294 295 296 297 298 299 300
> * 11, 11, 11, 10, 10, 10, 10, 10, 10, 10), NN
> 1006 IF (ICEP .GT. gen_maxcep) GO TO 1111
> NN = ICEP - 300
> C 301 302 303 304 305 306 307 308 309 310
> GO TO ( 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
> C 311 312 313 314 315 316 317 318 319 320
> * 11, 11, 11, 11, 11, 10, 10, 10, 10, 10,
> C 321 322 323 324 325 326 327 328 329 330
> * 10, 10, 10, 10, 10, 10, 10, 10, 11, 11,
> C 331 332 333 334 335 336 337 338 339 340
> * 10, 10, 11, 11, 11, 11, 10, 10, 10, 10,
> C 341 342 343 344 345 346 347 348 349 350
> * 11, 11, 11, 11, 10, 11, 11, 11, 10, 10 ), NN

Re: is there a better way to code this ?

<85a1b6f7-2d9d-4cdd-a904-752c641ad8f4n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2389&group=comp.lang.fortran#2389

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a5d:5a04:0:b0:21a:20b9:afbe with SMTP id bq4-20020a5d5a04000000b0021a20b9afbemr2753319wrb.550.1655354021525;
Wed, 15 Jun 2022 21:33:41 -0700 (PDT)
X-Received: by 2002:a0d:d8c9:0:b0:313:eca0:d940 with SMTP id
a192-20020a0dd8c9000000b00313eca0d940mr3547806ywe.287.1655354020964; Wed, 15
Jun 2022 21:33:40 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.128.88.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Wed, 15 Jun 2022 21:33:40 -0700 (PDT)
In-Reply-To: <46693e8b-7193-4338-847e-da37f2228f21n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:546:300:4c20:889f:e82a:40ed:ec38;
posting-account=7tVJUQoAAACymEG6aShD5R0lhHCm_A0r
NNTP-Posting-Host: 2601:546:300:4c20:889f:e82a:40ed:ec38
References: <t85qc4$kr5$1@dont-email.me> <46693e8b-7193-4338-847e-da37f2228f21n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <85a1b6f7-2d9d-4cdd-a904-752c641ad8f4n@googlegroups.com>
Subject: Re: is there a better way to code this ?
From: urbanjost@comcast.net (John)
Injection-Date: Thu, 16 Jun 2022 04:33:41 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: John - Thu, 16 Jun 2022 04:33 UTC

Well, for the first one for maintainability (and not wanting to even mention ASSIGN statements) and primarily for human intelligibility I might go with a way that worked even pre-f90;. It would probably be more efficient if populated with logicals but this format has a few advantages when a human has to manually
maintain the information

program testit
implicit none
integer :: nn
integer,parameter :: EQUALS(*)=[&
+1, -2, -3, +4, +5, -6, -7, -8, +9, -10, &
+11, -12, -13, +14, +15, +16, +17, -18, -19, -20, &
+21, +22, +23, +24, -25, +26, -27, -28, -29, -30, &
-31, +32, -33, -34, -35, -36, -37, -38, -39, -40, &
+41, +42, +43, +44, -45, +46, -47, -48, -49, -50, &
+51, +52, -53, -54, +55, -56, -57, +58, -59, -60, &
+61, -62, +63, -64, -65, -66, +67, +68, -69, +70, &
-71, -72, +73, -74, -75, -76, -77, -78, -79, -80, &
-81, -82, +83, +84, -85, -86, -87, -88, -89, +90, &
+91, +92, +93, -94, -95, -96, +97, +98, -99, -100, &
-101, +102, +103, +104, -105, -106, -107, +108, +109, +110, &
+111, +112, +113, +114, +115, +116, +117, +118, +119, +120, &
+121, +122, +123, +124, +125, +126, +127, +128, +129, +130, &
-131, -132, -133, +134, +135, +136, +137, +138, +139, +140, &
+141, -142, -143, -144, -145, -146, +147, -148, -149, -150, &
+151, -152, -153, -154, -155, -156, -157, -158, -159, +160, &
-161, -162, -163, +164, -165, -166, +167, +168, +169, +170, &
+171, +172, +173, -174, +175, -176, -177, -178, +179, -180, &
-181, -182, -183, -184, +185, +186, +187, +188, +189, +190, &
-191, -192, -193, +194, -195, -196, -197, -198, -199, +200, &
-201, +202, -203, -204, -205, -206, +207, -208, -209, -210, &
+211, +212, -213, -214, +215, -216, -217, -218, -219, +220, &
+221, +222, +223, -224, +225, +226, +227, +228, -229, -230, &
-231, -232, -233, -234, -235, +236, -237, +238, +239, +240, &
-241, -242, -243, -244, +245, -246, -247, -248, +249, -250, &
-251, +252, +253, +254, -255, -256, -257, -258, -259, -260, &
-261, -262, -263, -264, -265, -266, -267, -268, -269, -270, &
-271, -272, -273, +274, -275, +276, -277, +278, +279, +280, &
+281, +282, -283, -284, +285, -286, -287, -288, +289, -290, &
-291, -292, -293, +294, +295, +296, +297, +298, +299, +300, &
-301, -302, -303, -304, -305, -306, -307, -308, -309, -310, &
-311, -312, -313, -314, -315, +316, +317, +318, +319, +320, &
+321, +322, +323, +324, +325, +326, +327, +328, -329, -330, &
+331, +332, -333, -334, -335, -336, +337, +338, +339, +340, &
-341, -342, -343, -344, +345, -346, -347, -348, +349, +350]
! CHECK THE COMMANDS WHICH SHOULD HAVE EQUAL SIGN
! + no equal sign required
! - equal sign required
write(*,*)size(equals)==350
do nn=1,size(equals)
if(equals(nn)>0)then
write(*,*)nn,'equal sign required'
else
write(*,*)nn,'equal sign not required'
endif
enddo
end program testit

Re: is there a better way to code this ?

<756de836-a72b-45f4-8c66-9964fa732c8cn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2392&group=comp.lang.fortran#2392

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a5d:594b:0:b0:21a:7a2:4aed with SMTP id e11-20020a5d594b000000b0021a07a24aedmr8306773wri.231.1655451809921;
Fri, 17 Jun 2022 00:43:29 -0700 (PDT)
X-Received: by 2002:a81:5754:0:b0:310:57b7:23d7 with SMTP id
l81-20020a815754000000b0031057b723d7mr10062028ywb.58.1655451809392; Fri, 17
Jun 2022 00:43:29 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.128.87.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Fri, 17 Jun 2022 00:43:29 -0700 (PDT)
In-Reply-To: <85a1b6f7-2d9d-4cdd-a904-752c641ad8f4n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=202.67.103.232; posting-account=S_MdrwoAAAD7T2pxG2e393dk6y0tc0Le
NNTP-Posting-Host: 202.67.103.232
References: <t85qc4$kr5$1@dont-email.me> <46693e8b-7193-4338-847e-da37f2228f21n@googlegroups.com>
<85a1b6f7-2d9d-4cdd-a904-752c641ad8f4n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <756de836-a72b-45f4-8c66-9964fa732c8cn@googlegroups.com>
Subject: Re: is there a better way to code this ?
From: robin.vowels@gmail.com (Robin Vowels)
Injection-Date: Fri, 17 Jun 2022 07:43:29 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Robin Vowels - Fri, 17 Jun 2022 07:43 UTC

On Thursday, June 16, 2022 at 2:33:44 PM UTC+10, John wrote:
> Well, for the first one for maintainability (and not wanting to even mention ASSIGN statements) and primarily for human intelligibility I might go with a way that worked even pre-f90;. It would probably be more efficient if populated with logicals but this format has a few advantages when a human has to manually
> maintain the information
..
GO TO LAB(NN);
is still simpler in PL/I.
..
> program testit
> implicit none
> integer :: nn
> integer,parameter :: EQUALS(*)=[&
> +1, -2, -3, +4, +5, -6, -7, -8, +9, -10, &
> +11, -12, -13, +14, +15, +16, +17, -18, -19, -20, &
> +21, +22, +23, +24, -25, +26, -27, -28, -29, -30, &
> -31, +32, -33, -34, -35, -36, -37, -38, -39, -40, &
> +41, +42, +43, +44, -45, +46, -47, -48, -49, -50, &
> +51, +52, -53, -54, +55, -56, -57, +58, -59, -60, &
> +61, -62, +63, -64, -65, -66, +67, +68, -69, +70, &
> -71, -72, +73, -74, -75, -76, -77, -78, -79, -80, &
> -81, -82, +83, +84, -85, -86, -87, -88, -89, +90, &
> +91, +92, +93, -94, -95, -96, +97, +98, -99, -100, &
> -101, +102, +103, +104, -105, -106, -107, +108, +109, +110, &
> +111, +112, +113, +114, +115, +116, +117, +118, +119, +120, &
> +121, +122, +123, +124, +125, +126, +127, +128, +129, +130, &
> -131, -132, -133, +134, +135, +136, +137, +138, +139, +140, &
> +141, -142, -143, -144, -145, -146, +147, -148, -149, -150, &
> +151, -152, -153, -154, -155, -156, -157, -158, -159, +160, &
> -161, -162, -163, +164, -165, -166, +167, +168, +169, +170, &
> +171, +172, +173, -174, +175, -176, -177, -178, +179, -180, &
> -181, -182, -183, -184, +185, +186, +187, +188, +189, +190, &
> -191, -192, -193, +194, -195, -196, -197, -198, -199, +200, &
> -201, +202, -203, -204, -205, -206, +207, -208, -209, -210, &
> +211, +212, -213, -214, +215, -216, -217, -218, -219, +220, &
> +221, +222, +223, -224, +225, +226, +227, +228, -229, -230, &
> -231, -232, -233, -234, -235, +236, -237, +238, +239, +240, &
> -241, -242, -243, -244, +245, -246, -247, -248, +249, -250, &
> -251, +252, +253, +254, -255, -256, -257, -258, -259, -260, &
> -261, -262, -263, -264, -265, -266, -267, -268, -269, -270, &
> -271, -272, -273, +274, -275, +276, -277, +278, +279, +280, &
> +281, +282, -283, -284, +285, -286, -287, -288, +289, -290, &
> -291, -292, -293, +294, +295, +296, +297, +298, +299, +300, &
> -301, -302, -303, -304, -305, -306, -307, -308, -309, -310, &
> -311, -312, -313, -314, -315, +316, +317, +318, +319, +320, &
> +321, +322, +323, +324, +325, +326, +327, +328, -329, -330, &
> +331, +332, -333, -334, -335, -336, +337, +338, +339, +340, &
> -341, -342, -343, -344, +345, -346, -347, -348, +349, +350]
> ! CHECK THE COMMANDS WHICH SHOULD HAVE EQUAL SIGN
> ! + no equal sign required
> ! - equal sign required
> write(*,*)size(equals)==350
> do nn=1,size(equals)
> if(equals(nn)>0)then
> write(*,*)nn,'equal sign required'
> else
> write(*,*)nn,'equal sign not required'
> endif
> enddo
> end program testit

Re: is there a better way to code this ?

<t8lb5n$igi$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2417&group=comp.lang.fortran#2417

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran
Subject: Re: is there a better way to code this ?
Date: Sat, 18 Jun 2022 15:05:10 -0500
Organization: A noiseless patient Spider
Lines: 63
Message-ID: <t8lb5n$igi$1@dont-email.me>
References: <t85qc4$kr5$1@dont-email.me>
<46693e8b-7193-4338-847e-da37f2228f21n@googlegroups.com>
<85a1b6f7-2d9d-4cdd-a904-752c641ad8f4n@googlegroups.com>
<756de836-a72b-45f4-8c66-9964fa732c8cn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 18 Jun 2022 20:05:11 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="08603353ed3308a8ff83a6e2c87b5273";
logging-data="18962"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+qpDMJ2+QFDknGLzzZc1ie"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:EabgUwopJ9I8NnmUdYIhZItbepU=
In-Reply-To: <756de836-a72b-45f4-8c66-9964fa732c8cn@googlegroups.com>
Content-Language: en-US
 by: Lynn McGuire - Sat, 18 Jun 2022 20:05 UTC

On 6/17/2022 2:43 AM, Robin Vowels wrote:
> On Thursday, June 16, 2022 at 2:33:44 PM UTC+10, John wrote:
>> Well, for the first one for maintainability (and not wanting to even mention ASSIGN statements) and primarily for human intelligibility I might go with a way that worked even pre-f90;. It would probably be more efficient if populated with logicals but this format has a few advantages when a human has to manually
>> maintain the information
> .
> GO TO LAB(NN);
> is still simpler in PL/I.
> .
>> program testit
>> implicit none
>> integer :: nn
>> integer,parameter :: EQUALS(*)=[&
>> +1, -2, -3, +4, +5, -6, -7, -8, +9, -10, &
>> +11, -12, -13, +14, +15, +16, +17, -18, -19, -20, &
>> +21, +22, +23, +24, -25, +26, -27, -28, -29, -30, &
>> -31, +32, -33, -34, -35, -36, -37, -38, -39, -40, &
>> +41, +42, +43, +44, -45, +46, -47, -48, -49, -50, &
>> +51, +52, -53, -54, +55, -56, -57, +58, -59, -60, &
>> +61, -62, +63, -64, -65, -66, +67, +68, -69, +70, &
>> -71, -72, +73, -74, -75, -76, -77, -78, -79, -80, &
>> -81, -82, +83, +84, -85, -86, -87, -88, -89, +90, &
>> +91, +92, +93, -94, -95, -96, +97, +98, -99, -100, &
>> -101, +102, +103, +104, -105, -106, -107, +108, +109, +110, &
>> +111, +112, +113, +114, +115, +116, +117, +118, +119, +120, &
>> +121, +122, +123, +124, +125, +126, +127, +128, +129, +130, &
>> -131, -132, -133, +134, +135, +136, +137, +138, +139, +140, &
>> +141, -142, -143, -144, -145, -146, +147, -148, -149, -150, &
>> +151, -152, -153, -154, -155, -156, -157, -158, -159, +160, &
>> -161, -162, -163, +164, -165, -166, +167, +168, +169, +170, &
>> +171, +172, +173, -174, +175, -176, -177, -178, +179, -180, &
>> -181, -182, -183, -184, +185, +186, +187, +188, +189, +190, &
>> -191, -192, -193, +194, -195, -196, -197, -198, -199, +200, &
>> -201, +202, -203, -204, -205, -206, +207, -208, -209, -210, &
>> +211, +212, -213, -214, +215, -216, -217, -218, -219, +220, &
>> +221, +222, +223, -224, +225, +226, +227, +228, -229, -230, &
>> -231, -232, -233, -234, -235, +236, -237, +238, +239, +240, &
>> -241, -242, -243, -244, +245, -246, -247, -248, +249, -250, &
>> -251, +252, +253, +254, -255, -256, -257, -258, -259, -260, &
>> -261, -262, -263, -264, -265, -266, -267, -268, -269, -270, &
>> -271, -272, -273, +274, -275, +276, -277, +278, +279, +280, &
>> +281, +282, -283, -284, +285, -286, -287, -288, +289, -290, &
>> -291, -292, -293, +294, +295, +296, +297, +298, +299, +300, &
>> -301, -302, -303, -304, -305, -306, -307, -308, -309, -310, &
>> -311, -312, -313, -314, -315, +316, +317, +318, +319, +320, &
>> +321, +322, +323, +324, +325, +326, +327, +328, -329, -330, &
>> +331, +332, -333, -334, -335, -336, +337, +338, +339, +340, &
>> -341, -342, -343, -344, +345, -346, -347, -348, +349, +350]
>> ! CHECK THE COMMANDS WHICH SHOULD HAVE EQUAL SIGN
>> ! + no equal sign required
>> ! - equal sign required
>> write(*,*)size(equals)==350
>> do nn=1,size(equals)
>> if(equals(nn)>0)then
>> write(*,*)nn,'equal sign required'
>> else
>> write(*,*)nn,'equal sign not required'
>> endif
>> enddo
>> end program testit

So ? We are not talking about PL/I.

Lynn

Re: is there a better way to code this ?

<t8lbg1$ldi$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2418&group=comp.lang.fortran#2418

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran
Subject: Re: is there a better way to code this ?
Date: Sat, 18 Jun 2022 15:10:34 -0500
Organization: A noiseless patient Spider
Lines: 72
Message-ID: <t8lbg1$ldi$1@dont-email.me>
References: <t85qc4$kr5$1@dont-email.me>
<375bab02-f98a-464e-aac0-b14c2e39a842n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 18 Jun 2022 20:10:41 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="08603353ed3308a8ff83a6e2c87b5273";
logging-data="21938"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/FOHbETEd2GTkwBeOPtdzo"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:0ak+lLvz0fhto21GmdH/PLiVxaE=
In-Reply-To: <375bab02-f98a-464e-aac0-b14c2e39a842n@googlegroups.com>
Content-Language: en-US
 by: Lynn McGuire - Sat, 18 Jun 2022 20:10 UTC

On 6/12/2022 9:06 PM, gah4 wrote:
> C CHECK THE COMMANDS WHICH SHOULD HAVE EQUAL SIGN
> C 10 - no equal sign required
> C 11 - equal sign required
>
> integer needs(350)
> data needs/
> C ICEP = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
> * 10, 11, 11, 10, 10, 11, 11, 11, 10, 11, 10, 11, 11, 10, 10,
> C ICEP = 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
> * 10, 10, 11, 11, 11, 10, 10, 10, 10, 11, 10, 11, 11, 11, 11,
> C ICEP = 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
> * 11, 10, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 11,
> C ICEP = 46 47 48 79 50
> * 10, 11, 11, 11, 11,
> C ICEP = 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
> * 10, 10, 11, 11, 10, 11, 11, 10, 11, 11, 10, 11, 10, 11, 11,
> C ICEP = 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
> * 11, 10, 10, 11, 10, 11, 11, 10, 11, 11, 11, 11, 11, 11, 11,
> C ICEP 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
> * 11, 11, 10, 10, 11, 11, 11, 11, 11, 10, 10, 10, 10, 11, 11,
> C ICEP 96 97 98 99 100
> * 11, 10, 10, 11, 11,
> C ICEP = 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
> * 11, 10, 10, 10, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10,
> C ICEP 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
> * 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
> C ICEP 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
> * 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11,
> C ICEP 146 147 148 149 150
> * 11, 10, 11, 11, 11,
> C ICEP = 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
> * 10, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 11, 10, 11,
> C ICEP 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
> * 11, 10, 10, 10, 10, 10, 10, 10, 11, 10, 11, 11, 11, 10, 11,
> C ICEP 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
> * 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 11, 11, 11, 10, 11,
> C 196 197 198 199 200
> * 11, 11, 11, 11, 10,
> C ICEP = 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
> * 11, 10, 11, 11, 11, 11, 10, 11, 11, 11, 10, 10, 11, 11, 10,
> C 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
> * 11, 11, 11, 11, 10, 10, 10, 10, 11, 10, 10, 10, 10, 11, 11,
> C 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
> * 11, 11, 11, 11, 11, 10, 11, 10, 10, 10, 11, 11, 11, 11, 10,
> C 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
> * 11, 11, 11, 10, 11, 11, 10, 10, 10, 11, 11, 11, 11, 11, 11,
> C 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
> * 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11,
> C 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290
> * 10, 11, 10, 10, 10, 10, 10, 11, 11, 10, 11, 11, 11, 10, 11,
> C 291 292 293 294 295 296 297 298 299 300
> * 11, 11, 11, 10, 10, 10, 10, 10, 10, 10,
> C 301 302 303 304 305 306 307 308 309 310
> * 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
> C 311 312 313 314 315 316 317 318 319 320
> * 11, 11, 11, 11, 11, 10, 10, 10, 10, 10,
> C 321 322 323 324 325 326 327 328 329 330
> * 10, 10, 10, 10, 10, 10, 10, 10, 11, 11,
> C 331 332 333 334 335 336 337 338 339 340
> * 10, 10, 11, 11, 11, 11, 10, 10, 10, 10,
> C 341 342 343 344 345 346 347 348 349 350
> * 11, 11, 11, 11, 10, 11, 11, 11, 10, 10 /

I have to admit, this is my favorite. Especially if I could put the
data statement in the middle of the code.

One of my favorite things about C++ is that I can declare variables all
over the place. With an average of 2,000 lines of code per subroutine,
it would be nice to locate the variable declarations at their usage.

Lynn

Why I can't read from a parameter string? [was: is there a better way to code this ?]

<t8msda$q4d$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2425&group=comp.lang.fortran#2425

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!lfsn+8Y8XPk4JuCDnArrSA.user.46.165.242.91.POSTED!not-for-mail
From: drikosev@gmail.com (Ev. Drikos)
Newsgroups: comp.lang.fortran
Subject: Why I can't read from a parameter string? [was: is there a better way
to code this ?]
Date: Sun, 19 Jun 2022 13:05:29 +0300
Organization: Aioe.org NNTP Server
Message-ID: <t8msda$q4d$1@gioia.aioe.org>
References: <t85qc4$kr5$1@dont-email.me> <t8caqt$5so$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="26765"; posting-host="lfsn+8Y8XPk4JuCDnArrSA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.5.1
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
X-Mozilla-News-Host: news://news.aioe.org
 by: Ev. Drikos - Sun, 19 Jun 2022 10:05 UTC

On 15/06/2022 13:04, Ev. Drikos wrote:
> On 13/06/2022 01:46, Lynn McGuire wrote:
>> So, is there a better way to code this ?
>>
>
> Better no, maybe more compact. If performance is an
> issue one can declare ie the string as a parameter.
> ...

Admittedly, maintaining a packed array is likely more
difficult than a usual array of integers but i thought
that this wouldn't be a big problem for an experienced
programmer. Now, I focus to another problem i faced.

To my surprise, if one defined the packed array as a
parameter, the following statement would become invalid:

icep.f:20:1:
read(goes(icep:icep),*) nn
^
Expression at (^) has incorrect data type or rank for its context

Does anybody know why there is such a restriction?

----------------------------------------------
$ gfc --version 2>&1 | head -n1
GNU Fortran (GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)) 3.2.2 20030222
(Red Hat Linux 3.2.2-5)
$ gfc icep.f && ./a.out
11: goes=2

$
--------------- icep.f -------------------------------
! CHECK THE COMMANDS WHICH SHOULD HAVE EQUAL SIGN
! 10 - no equal sign required
! 11 - equal sign required

integer :: icep = 302 !ie
integer :: nn
character(350) :: goes = &
& '12121212121212121212121212121212121212121211212121'
& !001-050 21-70
& // '12121212121212121212121212121212121212121211212121'
& !051-100 21-70
& // '12121212121212121212121212121212121212121211212121'
& !101-150 21-70
& // '12121212121212121212121212121212121212121211212121'
& !151-200 21-70
& // '12121212121212121212121212121212121212121211212121'
& !201-250 21-70
& // '12121212121212121212121212121212121212121211212121'
& !251-300 21-70
& // '12121212121212121212121212121212121212121212121212'
!301-350 21-70
! __20 25 30 35 40 45 50 55 60 65 70__
! cells col.
!234567890123456789012345678901234567890123456789012345678901234567890xx

read(goes(icep:icep),*) nn
goto(10,11) nn

10 print *, '10: ', 'goes=', goes(icep:icep)
goto 999
11 print *, '11: ', 'goes=', goes(icep:icep)
goto 999
999 end

Re: Why I can't read from a parameter string? [was: is there a better way to code this ?]

<t8msqs$4tn$1@newsreader4.netcologne.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2426&group=comp.lang.fortran#2426

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!news.freedyn.de!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-3fa9-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.lang.fortran
Subject: Re: Why I can't read from a parameter string? [was: is there a
better way to code this ?]
Date: Sun, 19 Jun 2022 10:12:44 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <t8msqs$4tn$1@newsreader4.netcologne.de>
References: <t85qc4$kr5$1@dont-email.me> <t8caqt$5so$1@gioia.aioe.org>
<t8msda$q4d$1@gioia.aioe.org>
Injection-Date: Sun, 19 Jun 2022 10:12:44 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-3fa9-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd7:3fa9:0:7285:c2ff:fe6c:992d";
logging-data="5047"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Sun, 19 Jun 2022 10:12 UTC

Ev. Drikos <drikosev@gmail.com> schrieb:

> Does anybody know why there is such a restriction?
>
>
> ----------------------------------------------
> $ gfc --version 2>&1 | head -n1
> GNU Fortran (GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)) 3.2.2 20030222
> (Red Hat Linux 3.2.2-5)

Without looking at the code: g77 has not been maintained for a really
long time, and it only implements f77 + some extensions. I would not
be surprised by any restrictions of anything f90-like or later.

Pages:12
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor