View previous topic :: View next topic |
Author |
Message |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Sat Apr 22, 2017 7:01 am Post subject: |
|
|
I have made a note of this request. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Sat Apr 22, 2017 11:44 am Post subject: |
|
|
A tilda modifier has now been added to %tl for the next release. |
|
Back to top |
|
|
simon
Joined: 05 Jul 2006 Posts: 268
|
Posted: Thu Apr 27, 2017 4:36 am Post subject: |
|
|
Regarding Paul's comment about the * modifier in:
Code: | iw=winio@('%*`~ga&',n,irbs) |
I find that this works ok with FTN95, but I get the following ClearWin+ error message when using a third-party compiler:
winio@ failed to match format length.
Is that perhaps because it is not implemented in the 64-bit version? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Thu Apr 27, 2017 7:20 am Post subject: |
|
|
Not exactly. It has been implemented in clearwin64.dll but it might not work for third-party compilers.
ClearWin+ has an alternative calling mechanism for winio$ and third-party compilers because winio$ and winio@ can take a variable list of arguments. FTN95 passes information about this list but third-party compilers don't. So for third-party compilers, ClearWin+ peeks into the format string in order to work out the argument list before going on to process it in the normal way.
It is possible that the process of peeking needs to be fixed. I will make a note of this. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Thu Apr 27, 2017 8:00 am Post subject: |
|
|
I have had a quick look and I can't see anything wrong here.
Can you provide a short program that illustrates the failure? |
|
Back to top |
|
|
simon
Joined: 05 Jul 2006 Posts: 268
|
Posted: Sun May 07, 2017 4:29 am Post subject: |
|
|
Here is an example using the * modifier with %tl that crashes with Nagfor, but works in FTN95:
Code: | Program p
Use clrwin$, Only: winio$
Integer :: iw
!
iw = winio$('%ca@&', 'Test')
iw = winio$('%*tl&', 1, 5)
iw = winio$('A%taB')
End Program p
|
|
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Mon May 08, 2017 7:14 am Post subject: |
|
|
Simon
The format code %*tl is not available for third-party compilers. An improved error report has been added to make this clear.
The peeking process can't handle a case where one argument (apart from the initial string) determines how many arguments follow. That would require a peek into a peek.
The format code %~*tl is acceptable (~ is included in the latest download) because the argument list of tab values is replaced by a single array (so it doesn't depend on the value supplied by the *). |
|
Back to top |
|
|
|