X-Received: by 2002:a05:622a:58e:b0:304:da27:b691 with SMTP id c14-20020a05622a058e00b00304da27b691mr17943158qtb.601.1654557235962; Mon, 06 Jun 2022 16:13:55 -0700 (PDT) X-Received: by 2002:a05:620a:cda:b0:6a6:8e47:8901 with SMTP id b26-20020a05620a0cda00b006a68e478901mr15408080qkj.231.1654557235788; Mon, 06 Jun 2022 16:13:55 -0700 (PDT) Path: csiph.com!1.us.feeder.erje.net!feeder.erje.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.programming Date: Mon, 6 Jun 2022 16:13:55 -0700 (PDT) In-Reply-To: <0-udndl8abT_tJzanZ2dnUVZ_u6rnZ2d@comcast.com> Injection-Info: google-groups.googlegroups.com; posting-host=82.131.38.187; posting-account=Ua_8lQoAAAC43FHE39BXTDd6Zz2Jf5Ul NNTP-Posting-Host: 82.131.38.187 References: <0-udndl8abT_tJzanZ2dnUVZ_u6rnZ2d@comcast.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <4efec6da-da15-4075-8a4b-55c61ba94b20n@googlegroups.com> Subject: Re: 2-dimensional struct From: =?UTF-8?B?0JrRgNC40YHRgtGM0Y/QvSDQoNC+0LHQsNC8?= Injection-Date: Mon, 06 Jun 2022 23:13:55 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 3281 Xref: csiph.com comp.programming:15203 Wade Ward kirjutas Esmasp=C3=A4ev, 1. oktoober 2007 kl 20:07:44 UTC+2: > I want to create a 2d struct with the folllowing charaatarsistcs: > 3 x 3 matrix > rows or columns sum to: > 1.28, 5.5, 2 > the 1.28 row (column) is bounded by binary: > neg infinity 0 1 > 0 0 1 > one matrix bounds below; another bounds above; > contract; > http://www.zaxfuuq.net/beatdown3.htm > --=20 > wade ward > "The final irony is that cops > and rodney king have the same IQ." Intelligence test result is just a number. ****************************************************** Phone: 372 53900660 > program beatdown7 > implicit none > integer, parameter :: dp=3Dkind(1.0d0) > real(kind=3Ddp):: grams_per_gallon, bins, ergs, gallons_per_bin, subtotal > real(kind=3Ddp):: ergs_per_gram, gram_to_ergs , ten_to_the_five > real(kind=3Ddp):: scratch, abrasion, subtotal2, contusion, punitive, tota= l1 > real(kind=3Ddp):: dollars > bins =3D 55.0_dp > !units: 1 bin =3D .25 gallons > gallons_per_bin =3D .25_dp > !units: grams per gallon > grams_per_gallon =3D 946.34110134025_dp > !units: 1 gram =3D 9 e 20 ergs > gram_to_ergs =3D 9.0 > ten_to_the_five=3D100000.0 > ergs_per_gram=3Dgram_to_ergs * ten_to_the_five**4.0 > scratch =3D .5 > abrasion =3D 2 > contusion =3D 10.0 > punitive =3Dten_to_the_five**2 > ! the figgerin' > subtotal =3D bins * gallons_per_bin * grams_per_gallon > ergs =3D subtotal* ergs_per_gram >=20 > !subtotal2 =3D scratch+abrasion+contusion > !total1 =3D subtotal2 +punitive > ! (*,*) >=20 > write (*, '(A , F12.8)') "bins=3D ", bins > write (*, '(A , F12.8)') "scratch=3D ", scratch > write (*, '(A , F12.8)') "abrasion=3D ", abrasion > write (*, '(A , F12.8)') "contusion=3D ", contusion >=20 > write (*, '(A , F20.8)') " subtotal=3D ", subtotal > write (*, '(A , F20.8)') " subtotal2=3D ", subtotal2 > write (*, '(A , F12.8)') "total is ", total1 > write (*, '(A , F40.8)') "ergs=3D " ,ergs > write (*, '(A , F40.8)') "$$ =3D " ,dollars > write (*, '(A )') " 12345678911234567892123456. " > end program beatdown7