Silverfrost Forums

Welcome to our forums

Plato highlighting matching WHERE/ELSEWHERE/ENDWHERE

13 May 2021 8:47 #27757

I really like the new feature of Plato which highlights matching IF/ELSEIF/ENDIF etc.

One (very minor) thing I have noticed is that with WHERE/ELSEWHERE/ENDWHERE, only the initial WHERE and ENDWHERE are highlighted which differs from the IF/ELSEIF/ENDIF construction where all intermediate ELSEIF/ELSE statements are highlighted.

This difference can be a little confusing. For example with you select an intermediate ELSEIF statement the whole of the IF/ELSEIF/ENDIF construct is highlighted, but this is not the case if you select an intermediate ELSEWHERE.

14 May 2021 1:21 #27759

I 'd like to see highlighting of IF/EndIF and Do/Enddo in SDBG64 debugger too

14 May 2021 6:14 #27761

Dan

Plato has SDGB64 code built into it. You just have to select an option in the Settings to 'Integrate SDBG64' as opposed to spawning it.

Even if you prefer a different code editor, you can still run the debugger that way. Then you get all the Plato syntax colouring whilst debugging.

15 May 2021 3:32 #27770

I compile using batch files, but will try. Thanks, Paul

16 May 2021 8:10 #27779

Ken

I have made a note of the problem with WHERE/ELSE WHERE.

19 May 2021 8:01 #27802

Ken

I have fixed the WHERE/ELSE WHERE highlighting failure for the next release of Plato.

20 May 2021 1:57 #27812

Let's try to use it for first time as usually without reading anything about it, checking how intuitively it works πŸ˜ƒ I find this as the best way to learn. A decade ago there was a 30 seconds video how to do that, please remind if anyone knows. Anyone using PLATO, i do not like to ask Paul about this trivial stuff

  1. Naturally, I thought if instead of SDBG64 i will add EXE file (built old way by batch file) to Plato then i will run it this way and see the colored text in case of error but i failed to start exe file via PLATO. May be it's impossible to run this way?

  2. OK, since this does not work easily, then i took simple structured program which uses just two major Fortran source files + one include Fortran file + some resource bitmap and icon files (at the end of one of two major Fortran files ). I tried to add Fortran files to the project and compile everything. I failed to add the source file which one of my source files INCLUDEs. There exist option with right click to add source files to the project but there is no similar option to add INCLUDE file in the project tree. Without this file i failed to compile

20 May 2021 5:49 #27814

https://www.silverfrost.com/59/ftn95/videos.aspx

Try 'Getting started with FTN95' and skip the first part.

23 May 2021 6:59 #27839

I failed. My impression after another attempt i tried it 10 years ago? Yes, there are improvements. But it is not ready for everyday use. Clearly either no one uses PLATO, or no one reports bugs, problems or suggestions for improvement.

Because here are still a lot of obvious clearly visible problems and inconveniences.

All this comes from the many times expressed here opinion that the authors do not use it seriously for their own work. May be it is used for small demos but not for larger projects.

Did company ever asked any of users with larger programs what they think and send their suggestions to improve anything? It's time now because clearly a lot was done in 20 years and what is left to make Plato robust, stable and convenient software is just the intensive feedback users-developers. If company more welcomed users critics and suggestions, literally periodically soliciting them, Plato would be ready 20 years ago. Smaller company has no chance to beat larger competitors with large users base like Intel with its Fortran without actively 'shaking' potential users constantly emphasizing their advantages and quickly fixing problems.

We just see that everywhere. Take for example Brave browser. Have anyone heard about it? But its website in huge red font tells

**'[color=red:cab431efb6][size=18:cab431efb6]Browse 3x faster than Chrome! Brave stops online surveillance, loads content faster, and uses 35% less battery[/size:cab431efb6][/color:cab431efb6]' ** [size=18:cab431efb6][color=indigo:cab431efb6]We all know what’s wrong[/color:cab431efb6].[/size:cab431efb6] As a user, access to your web activity and data is sold to the highest bidder. Internet giants grow rich, while publishers go out of business. And the entire system is rife with ad fraud. [color=red:cab431efb6][size=18:cab431efb6]DOWNLOAD BRAVE[/size:cab431efb6][/color:cab431efb6]

Good browser, i use it. Anyway, to be able for Plato to tell users such bold words Plato needs quick fixes.

  1. Something is wrong with coloring. It sometimes coloring letter n in the word integer πŸ˜ƒ
  2. I do not see the reason not to debug in Plato after i compiled my code using command prompt. SDBG64 is doing that but Plato refuses as if not the same company made it. One has everything for start debug but another missing something.
  3. I still failed to compile the programs which uses 'INCLUDE filename'. I added appropriate file to INCLUDE FILES in the project by drag and dropping it (there is no right click option to do that) still compilation failed
  4. My files are all named with *.for extension but some are of free and some fixed format. After right click on Properties in Project Explorer there exist an option to clearly tell that to Plato but this does not change anything in text coloring scheme[color=red:cab431efb6][/color:cab431efb6]
24 May 2021 7:01 #27840

Dan,

Can you be clearer about problems using Plato.

I use Plato as my IDE and can't recall any significant issues.

  • The recent change to auto compile and getting an 'E' on a line I am typing, I see as a good thing. It is very helpful.

  • I would like better control on which compiler I am using, as I use FTN95, FTN95 /64 and gFortran -fopenmp. There are clashes with .mod files, which could be better managed ? (probably my lazyness in not adopting projects)

  • I do find the highlighting of IF ; END IF does have problems when moving the cursor into the IF block.

The main problem I have with Plato is I don't use projects, which would probably solve most of the usage problems I have. For large projects, I use .bat files for recompile and linking, as I use different compile options for different types of calculations.

When I am using Plato, I mostly have the Lahey Language Reference .pdf open. Highlighting a key word or intrinsic function and using F1 to pop up the description of the function or I/O connect-specs would be very helpful (Is it there already?)

I do find Plato very effective for editing code. If I have the .mod files available and the appropriate compiler selected, I can quickly update code to the correct syntax.

For Compile (Ctrl+F7), defaulting to /implicit_none and !$OMP DEFAULT(NONE) would be useful. I would like to be able to edit the default compile commands, as Compile (Ctrl+F7) and Start (Ctrl+F5) are the most frequent options I use.

Anyway, Dan, can you suggest some improvements that could be implemented.

24 May 2021 7:44 #27841

Dan

Perhaps you should test out Visual Studio. It would be interesting to read your experience and reactions. Then we could reflect upon a) the size of Microsoft compared with the size of Silverfrost and b) the number of users of Plato compared with the number of users of Visual Studio.

In my opinion (as the author of Plato) for Fortran, Plato is on a par with Visual Studio. In some respects it is better, in others not as good.

I use both Plato and Visual Studio all the time (meaning literally, all the time I am working I have both running).

Not that I want to persuade you to use Plato. My only concern is that you don't put others off.

There are a number of different YouTube demos (in various languages) that use FTN95 and Plato and the total number of 'Views' is in the tens of thousands if not more. So I suspect that your experience is not typical.

24 May 2021 8:15 #27846

Plato is used by people? Great, will return to drawing board and try again.

OK, John, next time we will find the bug, defect or inconvenience we know who we have to blame for procrastination of reporting it πŸ˜ƒ

25 May 2021 5:33 #27847

Plato assumes by default that files with the extension .for use fixed format Fortran, etc.. This could explain a poor experience with the syntax colouring.

It can be configured differently via the Settings dialog.

26 May 2021 6:31 #27853

How about adding option for automatic free/fixed recognition? It is easy to implement. If failed - computer will ask

26 May 2021 10:20 #27856

Dan,

.f or .for are reserved for fixed-format, while .f90 or .f95 are reserved for free-format. Mixing these is asking for trouble, as we have always had with include files.

Perhaps the request should be to have FTN95 identify if include files are free or fixed format.

I have always used a '.ins' file suffix for include file ($INSERT was used a long time ago in FTN77). I have never thought to test if a .f90 include file would be interpreted as free format, if referenced from a .for file ? Given the mess of mixed formats used in FTN95 include files, having .f90 instead of .ins as a suffix could have provided more readable include files.

26 May 2021 12:30 #27861

If you use file extensions consistently (for fixed and free format Fortran) then Plato can be configured accordingly.

In the Settings dialog (on the Tools menu), select 'Text Editor', then 'Language settings' and finally Free or Fixed format Fortran.

In the edit box for 'File Filter', set the relevant file extensions.

26 May 2021 4:51 #27863

Are f, for, f90, f95 extensions reserved for fixed and free format by the Standard or just traditionally? Anyway, it is very easy to detect what format it is automatically. Artificial intelligence will substitute 50% of humans in 20 years and we are talking about elementary

26 May 2021 5:11 #27864

They are not in the Standard but are commonly assumed. FTN95 makes the same assumption.

If you want to send me your algorithm for automatically testing for fixed/free format then I will see if I can add it to Plato and FTN95.

26 May 2021 10:12 #27865

The FTN95 can do that itself by pre-processing the source code with and without /free or /fixed . It is doing that very fast as only beginning 10-20 errors will stop it.

If the file is fixed form but compiled as /free FTN95 gives many errors with diagnostics like

*** Invalid character '*' at start of line, statement not recognised

and if free format source compiled as fixed format source it gives errors like

*** Invalid characters in label field of FIXED format source, Statement not recognised

Other indicators -

  1. columns 1 through 5 are reserved for statement labels for fixed format and not for free
  2. letter C or an * placed in column 1 indicates that the statement is a comment for fixed and give error with /free
  3. words continuing after 72th character are for /free unless there is no restriction with 72 characters are given with special compilation key
  4. continuations of free format source end with &

etc also give the clue if this is fixed source or free one. The simplest 30 minutes program which checks 1) and 2) already gives 99% chance that the source code is identified, all 4 will give 99.99%. This is not a self-driving AI problems like in Tesla electric car πŸ˜ƒ

If problem will occur, and they will with not yet debugged code, or text is too small (like just one line Hello World) the preprocessor may ask the user: 'The text too small, has non-standard syntax or not yet fully debugged, with probability 98% it looks like a fixed format source. Do you agree to treat it as fixed one?'

Other approach is to use Metcalf's converter from fixed to free format source code for it is freely available. Preprocessing fortran source with it but without real conversion and just counting in how many lines it had similar troubles like FTN95 above had, will also tell if this is actually fixed source or not

https://people.math.sc.edu/Burkardt/f_src/f77_to_f90/f77_to_f90.f90

Ones Mecej4 gave me the program which extracts snippets out of large code. It preprocessed the source code with much larger details than i even know. And you also know much more than me in these matters

This human-computer communication with the user will make Plato simpler and more enjoyable to work with. Answering its Yes No is simpler than digging inside and trying to find where the hell is this or that settings

27 May 2021 7:18 #27866

Dan

Thank you for your detailed reply. Unfortunately I don't know how to respond without getting into a long conversation.

Please login to reply.