forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Ganged buttons
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Sat Apr 22, 2017 7:01 am    Post subject: Reply with quote

I have made a note of this request.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Sat Apr 22, 2017 11:44 am    Post subject: Reply with quote

A tilda modifier has now been added to %tl for the next release.
Back to top
View user's profile Send private message AIM Address
simon



Joined: 05 Jul 2006
Posts: 268

PostPosted: Thu Apr 27, 2017 4:36 am    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Thu Apr 27, 2017 7:20 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Thu Apr 27, 2017 8:00 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
simon



Joined: 05 Jul 2006
Posts: 268

PostPosted: Sun May 07, 2017 4:29 am    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Mon May 08, 2017 7:14 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group