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 

EDIT_CLIPBOARD_CUT@, Etc.

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
Anonymous
Guest





PostPosted: Wed Feb 22, 2006 10:26 am    Post subject: EDIT_CLIPBOARD_CUT@, Etc. Reply with quote

In the FTN95 Help and FTN77 printed manuals, EDIT_CLIPBOARD_CUT@ is shown as an INTEGER*4 function, but in the CLEARWIN.INS files for both compilers the C_EXTERNAL definition is for a subroutine, not a function. The same is true of the _COPY@ and _PASTE@ functions. Which form is correct with respect to what is actually in the salflibc.dll library?

Dennis Strong, Strong Concepts
Back to top
PaulLaidler
Site Admin


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

PostPosted: Wed Feb 22, 2006 11:45 am    Post subject: EDIT_CLIPBOARD_CUT@, Etc. Reply with quote

Dennis

EDIT_CLIPBOARD_CUT@ is a function that always returns 1.
EDIT_CLIPBOARD_COPY@ is a function that always returns 1.
EDIT_CLIPBOARD_PASTE@ is a function that returns 1 for success and 0 for failure (when the clipboard is empty).

You can use a function as though it was a subroutine so there seems no point in changing the definitions of the first two. I will change the .ins files for _PASTE@ and check the help file.
Back to top
View user's profile Send private message AIM Address
DStrong



Joined: 22 Feb 2006
Posts: 13
Location: Chicago, Illinois, USA

PostPosted: Wed Feb 22, 2006 12:23 pm    Post subject: EDIT_CLIPBOARD_CUT@, Etc. Reply with quote

It seems the potential problem is that if the .INS defines _CUT@ and _COPY@ as subroutines, but the help file shows them as functions and so someone calls them as functions, that this is opposite from what you've described. Since they really are functions, as described in the help file, wouldn't it be most appropriate to change the .INS for all three to show them as functions? In the short-term, these are the (3) edits I'd like to make to my .INS files and correspondingly change my subroutine CALLs to function assignments, but I want to make changes that will also be valid for future versions of the compiler/.INS files.

On a related subject, while you're checking into the help file, the 6th (last) call parameter for FIND_EDIT_STRING@ is not shown in the help file (it is present in the .INS files), and it should be shown as 'INTEGER FUNCTION', not just 'INTEGER'. The 'INTEGER FUNCTION' is also missing in the help file for FIND_REPLACE_EDIT_STRING@ and SCROLL_EDIT_BUFFER@.

Dennis Strong, Strong concepts
_________________
Dennis Strong
Strong Concepts
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Feb 23, 2006 1:22 am    Post subject: EDIT_CLIPBOARD_CUT@, Etc. Reply with quote

Yes I had already changed my mind on this.
What you suggest is simpler.
I will also check the other items.
Back to top
View user's profile Send private message AIM Address
DStrong



Joined: 22 Feb 2006
Posts: 13
Location: Chicago, Illinois, USA

PostPosted: Thu Feb 23, 2006 9:39 am    Post subject: EDIT_CLIPBOARD_CUT@, Etc. Reply with quote

Thanks for your quick response, Paul.

For now I'll make the following changes to my CLEARWIN.INS files for EDIT_CLIPBOARD_CUT@, EDIT_CLIPBOARD_COPY@ and EDIT_CLIPBOARD_PASTE@ -- on the C_EXTERNAL lines for these programs I will add " : INTEGER*4" at the end, and change my usage of these programs back to I*4 function calls, as documented, instead of subroutine calls. Then this will be consistent with the next release of the software.

Dennis Strong, Strong Concepts
_________________
Dennis Strong
Strong Concepts
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Fri Feb 24, 2006 2:33 am    Post subject: EDIT_CLIPBOARD_CUT@, Etc. Reply with quote

Dennis

I have made the recommended changes for the next release.
Here is a copy of a revised help file topic...

INTEGER FUNCTION FIND_EDIT_STRING@(E,STR,BACKWARDS,WHOLE_WORD, &
CASE_SENSITIVE,SELECT_RESULT)
INTEGER E(24) ! EDIT_INFO block
CHARACTER*(*) STR ! String to seek
LOGICAL BACKWARDS ! TRUE performs backward search
LOGICAL WHOLE_WORD ! TRUE seeks a whole word
LOGICAL CASE_SENSITIVE ! TRUE when case must match
LOGICAL SELECT_RESULT ! TRUE to leave result selected

This function searches for the specified string and returns 1 if successful and zero otherwise. Typically you would supply a search menu item on a window containing an edit box. In the call-back function associated with that menu you would display a dialog box to obtain the string (%rs) and some of the various flags (%rb) and then call find_edit_string@. Although designed for %eb, this function may also be useful when searching for a sub-string in a string obtained from some other source.

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
Page 1 of 1

 
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