Deutsch English Français Italiano |
<vfbgtf$25j82$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lynn McGuire <lynnmcguire5@gmail.com> Newsgroups: comp.lang.fortran Subject: Re: Is there a way in Fortran to designate an integer value as integer*8 ? Date: Wed, 23 Oct 2024 13:56:47 -0500 Organization: A noiseless patient Spider Lines: 80 Message-ID: <vfbgtf$25j82$1@dont-email.me> References: <vdict2$339ak$1@dont-email.me> <vdir24$35104$1@dont-email.me> <vdk718$3bulb$1@dont-email.me> <vdl6fi$3jra3$2@dont-email.me> <vdlfpl$3l0f5$1@dont-email.me> <vdmbml$3p2dv$1@dont-email.me> <vdmrgc$3rih7$2@dont-email.me> <vdn4kp$3ssv4$9@dont-email.me> <vdn4ul$3t78e$3@dont-email.me> <vdn659$3ssv4$18@dont-email.me> <vdnrr9$3qrq$1@dont-email.me> <vdnvgh$49ai$1@dont-email.me> <vdqe7n$kqq0$1@dont-email.me> <vdqmue$lo51$11@dont-email.me> <vds64m$sj9s$1@dont-email.me> <vf2507$9mo4$2@dont-email.me> <vf4mbh$qfqu$1@dont-email.me> <vf4pi2$qsfn$1@dont-email.me> <vf7but$1blh6$1@dont-email.me> <vf98hi$1lsqn$2@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Wed, 23 Oct 2024 20:56:48 +0200 (CEST) Injection-Info: dont-email.me; posting-host="12718488e3fb95f926f84e92473f53ad"; logging-data="2280706"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+DVa8/lkPP20p3EoJZugPN1aJ24rdeLBU=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:zokGLS6eyzSciFmVZBuPCDjADUM= Content-Language: en-US In-Reply-To: <vf98hi$1lsqn$2@dont-email.me> Bytes: 4746 On 10/22/2024 5:21 PM, Lawrence D'Oliveiro wrote: > On Tue, 22 Oct 2024 00:07:41 -0500, Lynn McGuire wrote: > >> Here is one of my 197 common block include files, global.inc: >> >> C global.inc >> C >> C >> C 11/21/19 Lynn McGuire pmr 6299, add new ncp max used variable for chemtran > > Those are the sorts of things that belong in your version control > system. > >> ... > > What, no “implicit none”? Or do you put this in the including files? > >> integer MAX_NCP >> PARAMETER (MAX_NCP = 1000) > > All these pairs of lines can be replaced with single lines, e.g. > > integer, parameter :: MAX_NCP = 1000 > >> COMMON / GLOBAL / KTRACE, NCP, SETSTP, NDYNER, NERQQQ, LNOLIMIT, >> * do_not_call_pivf, do_not_call_adbf, >> * ne_did_not_converge, equipment_fail_count, >> * lrespect_user_pitch, do_not_call_threephs, >> * do_not_call_flai, do_not_call_liqh, >> * do_not_call_vaph, thermo_init_failed, >> * num_crude_streams, print_streams_for_each_unit, >> * do_not_call_solid_isothermal_flash, >> * ncp_max_used >> >> integer KTRACE >> integer NCP >> logical SETSTP >> integer NDYNER >> integer NERQQQ >> integer num_crude_streams >> logical LNOLIMIT >> logical do_not_call_pivf >> logical do_not_call_adbf >> logical lrespect_user_pitch >> logical do_not_call_threephs >> logical do_not_call_flai >> logical do_not_call_liqh >> logical do_not_call_vaph >> logical thermo_init_failed >> logical print_streams_for_each_unit >> logical do_not_call_solid_isothermal_flash >> C this is to record the ncp max used for chemtran since itchanges ncp on the fly >> integer ncp_max_used > > Much more concisely: > > module GLOBAL > integer :: KTRACE, NCP, SETSTP, NDYNER, NERQQQ, num_crude_streams > logical :: LNOLIMIT, do_not_call_pivf, do_not_call_adbf, lrespect_user_pitch, & > do_not_call_threephs, do_not_call_flai, do_not_call_liqh, do_not_call_vaph, & > thermo_init_failed, print_streams_for_each_unit, do_not_call_solid_isothermal_flash > integer :: ncp_max_used > ! this is to record the ncp max used for chemtran since itchanges ncp on the fly > end module GLOBAL > > Then you just do “use GLOBAL” where you need these definitions. > > etc etc BTW, my software dates before version control systems. 1965 or so to be exact. And I like change notes in my code, it helps to figure out what is going on. And some day we are going to change version control systems again. And I am not going to upgrade 850,000 lines of Fortran F77 code to F90 code just to have prettier code. I would still be here in 10 years fixing all of the bugs from that disaster. Lynn