View previous topic :: View next topic |
Author |
Message |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8011 Location: Salford, UK
|
Posted: Thu Aug 22, 2024 7:29 am Post subject: |
|
|
Alan
I had made one other change.:
The subroutine G_INIT_GLO was defined with no arguments but called with two. So I changed line 29 in the file g_injob.f95.
This ought to be flagged as a compile time error so perhaps you could check your batch files.
Using Plato and the ClearWin+ that has been fixed, your program runs fine for me (Win32 and x64) including resizing the displayed graphs.
Incidentally Plato did not exactly perform as it should so this exercise has given me something to fix in Plato. |
|
Back to top |
|
|
AlanVardy
Joined: 17 Dec 2013 Posts: 16
|
Posted: Thu Aug 22, 2024 9:10 am Post subject: |
|
|
Paul
1. In the code that I zipped to you, there are no arguments in either location - so I infer that this flags a change that you have made.
2. Probably, everything would resolve itself if you send your working version version of the complete program to me - as provisionally suggested a few posts ago. I would first check that it works here too - and then, for my own education, explore what changes have been made.
Alan |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8011 Location: Salford, UK
|
Posted: Sat Aug 24, 2024 12:51 pm Post subject: |
|
|
Alan
I have gone back to your zip archive and I have run your batch files.
The resulting exe runs OK without any changes but I am using the ClearWin+ with the fix for metafile_resize.
I would expect your code to run successfully if metafile_resize is removed.
Here is the result of a grep for G_INIT_GLO...
C:\GraphTun>grep -S G_INIT_GLO *.f95
.\input\G_INJOB.f95: CALL G_INIT_GLO(NDAT,NTOKEN)
.\input\G_INPUT.f95: CALL G_INIT_GLO
.\modules\G_MODULE_GLO.f95: SUBROUTINE G_INIT_GLO
G_INJOB.f95 does not appear in your batch files and this accounts for my confusion. |
|
Back to top |
|
|
AlanVardy
Joined: 17 Dec 2013 Posts: 16
|
Posted: Sat Aug 24, 2024 2:32 pm Post subject: |
|
|
Paul
I do apologise for the confusion caused by the existence of G_INJOB. Its use was discontinued ages ago, but I had not noticed that the file still existed.
METAFILE_RESIZE had already been removed when I posted at 5:35 on Wednesday. Nothing has been changed since then, but I have recompiled and rerun, just in case. The same failure occurs.
The instruction:
RESULT = WINIO@('%LW', IWIN1)
still returns "RESULT = 0" and "IWIN1 = -1"
Then, in G_PAGE, the call to DRAW_FILLED_RECTANGLE@ fails, triggering the failure message:
"No graphics window open"
Would it be useful for one of us to send to the other the current version of the source code? However, I am uncomfortable with you spending time on my problem at a weekend. Monday would be plenty soon enough.
Thanks, as ever
Alan |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8011 Location: Salford, UK
|
Posted: Sat Aug 24, 2024 3:49 pm Post subject: |
|
|
Alan
A RESULT value of zero is normal in this context.
SELECT_GRAPHICS_OBJECT@ takes a 32 bit integer value supplied by the programmer. I can see that you have set this to 1. The function returns the value 1 on success. Calling it as a subroutine (as you have done) ought to be OK but you could check this.
I think that's all I can do on this issue. For me it also works for 64 bits so you could try adding /64 to the FTN95 command line to see what happens but remember to leave out the metafile_resize option in
Code: | RES2 = WINIO@('%`GR[GREY,METAFILE_RESIZE]&', NXPIXEL,NYPIXEL,HANDSCRN)
|
|
|
Back to top |
|
|
AlanVardy
Joined: 17 Dec 2013 Posts: 16
|
Posted: Mon Aug 26, 2024 6:18 am Post subject: |
|
|
Response in the Forum
Paul
Bingo! The final line in you last post revealed what was needed.
Previously, I had commented out the whole WINIO@ line containing %gr. With hindsight, this was completely stupid, but it is the sort of error that can happen when reviewing software that has not been touched for about 15 years. I use FTN95 extensively in software that uses GraphTun to display output, but the only other uses of ClearWin routines in all that time were (i) converting from FTN77 and (ii) revising colours when the default in Salflibc.dll was changed to reflect modern usage.
Anyway, I truly apologise for failing to follow your original METAFILE_RESIZE guidance correctly and I thank you again for your help and patience.
Alan |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8011 Location: Salford, UK
|
Posted: Mon Aug 26, 2024 6:42 am Post subject: |
|
|
Alan
Your are welcome. Don't forget that metafile_size will be available again in the next release of ClearWin+. |
|
Back to top |
|
|
|