Silverfrost Forums

Welcome to our forums

Change Variable values at debug time in Plato?

9 Sep 2011 10:24 #8929

Is it possible to change Variable values at debug time? I'll make a break and after arriving this break I'll change the content of an variable value! Is this possible in plato? I receive the info that this is NOT possible in VS201 environment in FTN95 Silverfrost Version 6. Is this right?

Kind regards Michael

9 Sep 2011 11:17 #8931

This is an interesting question! The most debuggers that I have used in the past do not have this option. Why not just add a line of code to change the variable to the desired value?

10 Sep 2011 8:08 #8948

I don't know of any way to change the variables via SDBG at runtime (other than via the code).

13 Sep 2011 1:53 #8963

Yes you are right. I had forgotten about that feature.

13 Sep 2011 2:02 #8965

It works - a feature I never knew! One should however use the correct syntax for the command.

2 Nov 2011 9:42 #9175

I was hoping for something like a compiler directive like 'EQUATE' in other languages, especially assemblers. Consider....

  EQUATE (value,80)

  OPEN    (UNIT=LU19,FILE='FILEADIR.TXT',RECL=value,ERR=8, &
           ACCESS='DIRECT',FORM='FORMATTED',STATUS='NEW')
3 Nov 2011 8:30 #9179

In what way is that different from a simple Fortran assignment statement..

value = 80

3 Nov 2011 1:24 #9181

Paul,

Just an idea: does he mean the EQUATE bit to be something you type into the debugger, and the following Fortran code to be how the program uses it?

E

3 Nov 2011 4:58 #9182

Sorry, I chose the wrong variable in the Open statement. Should have been the ERR instead of the RECL.

I = 80 OPEN.................ERR=I.........

E:\FORTRAN JOBS\JOINABMM.F95(260) : error 525 - Invalid character 'I' after ERR E:\FORTRAN JOBS\JOINABMM.F95(260) : error 517 - Labels must not be zero (0) Compilation failed.

The EQUATE (or similar) statement should be universal across all 'languages' including scripts. The purpose of the EQUATE statement is the exchange of SYMBOLS, not necessarily values like was exemplified by Paul.

An EQUATE statement immediately after the opening identification statement (PROGRAM,SUBROUTINE,FUNCTION,etal) of the program would take care of this problem as shown. Better yet, the statement should be a compiler directive instead and be among the first lines the compiler sees BEFORE any language statements.

4 Nov 2011 7:44 #9184

The FTN95 help file (FTN95.chm) describes Conditional Compilation (VPARAM and SPARAM) and also C-Style preprocessing (#define etc).

Please login to reply.