forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SLINK64 diagnostics
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Thu Feb 15, 2018 12:23 pm    Post subject: Reply with quote

I agree that it is desirable that it should be all or nothing as far as IMPLICIT NONE is concerned, the point was that if you want it, it is possible to implement it routine-by-routine AND still keep the old implicit type conventions. As for me, the certain knowledge of what is INTEGER is invaluable, as I still use codes I wrote well over 40 years ago. My only type assumption error was declaring lambda to be REAL, and that drove me nearly mad. I'd lost access to machines where single precision was 48 or 60 bits, and 32 bits wasn't good enough to converge the calculation. The problem wasn't even that I thought it was INTEGER, I knew I'd 'sorted it out' a decade before. IMPLICIT NONE wouldn't have helped, as the type was declared (to be the useless 32 bit standard precision REAL).

I think that your suggestion that in Plato the different variable type could be shown colour coded is an excellent one (for those afflicted by IMPLICIT NONE). Perhaps in response to a switch. I hope that Paul takes notice.

As for everyone looking like a man, I didn't know that you had spent time in an East German Olympics squad!

Eddie
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2551
Location: Sydney

PostPosted: Thu Feb 15, 2018 2:43 pm    Post subject: Reply with quote

I am a bit lost about this IMPLICIT NONE discussion.

You can put an IMPLICIT NONE at the start of each (or some) routine.
You then have to explicitly define the type of all variables being used, be they in MODULE, COMMON or local.

There is no requirement to make I a real variable or A1 an integer.
You just have to declare their type.

What you are effectively doing is providing a dictionary of allowable variable names for each routine, so if the variable name is not in the "dictionary", then you get an error report.

If you use include files for COMMON or modules, then declaring all variables listed in the include file replicates the work for all routines that use these includes. With modules, there is less work, as a module is typically a list of declarations.

You are then left to declare the local variables in each routine. As for 1000's of variables, how can that work ? I have always had a coding strategy of a routine can fit onto a page ( 60 lines of code ) hard to get 1000's of local variables into a single routine.
I do have modules that are 1000+ lines long, with derived type definitions and global variables. I need a dictionary in this case.
I think you would be surprised how many spelling errors you have in your code.

Really not sure how this destroys the spirit of I being an integer ?

John
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Thu Feb 15, 2018 3:09 pm    Post subject: Reply with quote

Precisely, John. The issue of how you name your variables of different types is separate from whether or not you use IMPLICIT NONE or not, and as well as incrementally incorporating IMPLICIT NONE in your code routine-by-routine, you are right that you can do it in INCLUDE files.

E
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Thu Feb 15, 2018 3:22 pm    Post subject: Reply with quote

What if i forget to declare I123453423 ?
Why i need to go to another file, module or function or hell knows where to see was I123453423 declared or not and if yes then how?
Why when debug or update the code i have to search I123453423 among 1000 other variables like I123423, I423343412, I52345345, I52345234534, I345345453452345, I23453456q4356w4565467e3567, i5345345345345345345, i545345w3234423234234234, i43423542345634632465, I332wersdssdfsdfsdfsdf, Ir4233423424234, I342342342345_1234, I23423434563456235423452, I2431234234234234, I423434234234. My modules have many pages of declarations only computer search can find anything there.

We have better things to do as /undef and /73 will find us more then just stupid typos without even thinking about all of the above
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Thu Feb 15, 2018 3:48 pm    Post subject: Reply with quote

Calm down, Dan! You don't have to - well, at least not currently. But if you wanted to, you don't have to do it all at once. And if the Fortran Committee dictate, maybe you'll have to. As for me, I'll never use IMPLICIT NONE. It's snake oil.
Fortunately, my needs will have expired long before the Fortran Committee get round to outlawing Fortran as we know it and replacing the source form with cascading columns of mixed Hiragana, Katakana and Kanji,only in green!
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Fri Feb 16, 2018 10:05 am    Post subject: Reply with quote

An interesting discussion this one.

IMPLICIT NONE
lest we forget ... has only one function --> to force the coder to define ALL variables EXPLICITLY, thus forcing checking that each and everyone is correctly defined.
I see pros and cons of each one.
If someone doesn't want to be bothered checking through hundreds, if not thousands of variable declarations (route IMPLICIT NONE) then that's their choice, but doesn't eliminate errors because to achieve the optimum outcome means that you must have correctly implicitly defined all variables.
The opposite route involves being forced to define everything, to be sure.
I guess it's a toss up also as to whether you want to rely on yourself for checking or on the computer checking facilities.
And there's the rub - both are not 100% fool-proof.

Yer makes yer choice and you pays the consequential price, as it were.

The colour-coded checking (in PLATO, or indeed any other text-editor if that's feasible) would obviously be an aide.
What would be also invaluable would be to be able to get listings, split into various groups - everything, routine/function by routine/function directly from the compiler with an option !
After all the compiler has all this information about variables already stored no ?
This should be tabular output.

<Routine Name>
<vaname> <type> <precision/kind> <other(s)> ... .or similar
.
.

for all variables, grouped as mentioned above.
An invaluable reference for any program.

___________________

Dan's (Devilry) Dilemma
Dan, you're too hard on yourself in your self-assessment !
and Your english is no worse than many 'native americans' :O)
.. .and my spelling faut-pas's because of my dodgy keyboard are far worse and more frequent(ly non-corrected) than anything in your posts.
I for one value your expertise, your willingness to help anyone, and above all your enthusiasm in encourageing people to get onboard the ftn95 train and to enjoy the ride.
Age has taught me that it's better to think long and hard before ploughing into the youthful, brash coding-correction loop of which I once was a proponent, and which has it's merits but also needs a lot of 'correction' time.
It's the test it and break it
Besides which I'm still playing catch-up on good fortran coding practice let alone the subtleties of F95 enhancements, and let let alone the joys of Clearwin GUI programming, which is a nice cherry to stick on your scientific coding cake but which always rune the risk of 'taking over' due to over-elaboraton and zeal.
___________________


Turning Japanese
Eddie's pre-postumous prediction of Japanese styled future Fortran (maybe Manga-tran ? , that's got a nice ring to it) might be alittle premature, some would say kamikaze, as to do that there would be a need for at least x3 and probably x4 keyboards, each of which would be at least twice the size of a normal keyboard, and the third being approximately 80 times as large if Manga-tran were to be thorough and universal.
(thanks for the pointer to learning the Japanese language Eddie Wink )
_____________________

Abandon Ship ?
Meanwhile Paul wrote:
Quote:
I am not sure that I want to go digging into SLINK at this late stage.


which is a little disconcerting - late stage of what ?
Does this comment indicate a future intention to abandon 32-bit ?
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2551
Location: Sydney

PostPosted: Wed Feb 21, 2018 12:04 am    Post subject: Re: Reply with quote

DanRRight wrote:
What if i forget to declare I123453423 ? ... We have better things to do ... then just stupid typos

Dan, I think you have better things to do than use I123453423 as a variable name. It looks to me that you have opened the door for the devil and set out the milk and cookies !!
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Wed Feb 21, 2018 5:39 am    Post subject: Reply with quote

Dan's devil finally identified ! (thanks to JC's intuition Wink

https://www.youtube.com/watch?v=-qTIGg3I5y8&t=19s
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group