View previous topic :: View next topic |
Author |
Message |
m.burkhardt
Joined: 02 Sep 2008 Posts: 26
|
Posted: Fri Sep 09, 2011 11:24 am Post subject: Change Variable values at debug time in Plato? |
|
|
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 |
|
Back to top |
|
 |
jjgermis
Joined: 21 Jun 2006 Posts: 404 Location: N�rnberg, Germany
|
Posted: Fri Sep 09, 2011 12:17 pm Post subject: |
|
|
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? |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Sat Sep 10, 2011 9:08 am Post subject: |
|
|
I don't know of any way to change the variables via SDBG at runtime (other than via the code). |
|
Back to top |
|
 |
brucebowler Guest
|
Posted: Tue Sep 13, 2011 1:31 pm Post subject: |
|
|
Unless I'm missing something, doesn't "Tools>>command prompt..." let you do that with "let variable=expression"?
Bruce |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Tue Sep 13, 2011 2:53 pm Post subject: |
|
|
Yes you are right. I had forgotten about that feature. |
|
Back to top |
|
 |
jjgermis
Joined: 21 Jun 2006 Posts: 404 Location: N�rnberg, Germany
|
Posted: Tue Sep 13, 2011 3:02 pm Post subject: |
|
|
It works - a feature I never knew! One should however use the correct syntax for the command. |
|
Back to top |
|
 |
felix
Joined: 09 Aug 2011 Posts: 5
|
Posted: Wed Nov 02, 2011 10:42 pm Post subject: |
|
|
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") |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Thu Nov 03, 2011 9:30 am Post subject: |
|
|
In what way is that different from a simple Fortran assignment statement..
value = 80 |
|
Back to top |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2402 Location: Yateley, Hants, UK
|
Posted: Thu Nov 03, 2011 2:24 pm Post subject: |
|
|
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 |
|
Back to top |
|
 |
felix
Joined: 09 Aug 2011 Posts: 5
|
Posted: Thu Nov 03, 2011 5:58 pm Post subject: |
|
|
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. |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Fri Nov 04, 2011 8:44 am Post subject: |
|
|
The FTN95 help file (FTN95.chm) describes Conditional Compilation (VPARAM and SPARAM) and also C-Style preprocessing (#define etc). |
|
Back to top |
|
 |
|