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 

clearwin_string@ and clrwin

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
sparge



Joined: 11 Apr 2005
Posts: 371

PostPosted: Mon Jul 11, 2005 5:09 am    Post subject: clearwin_string@ and clrwin Reply with quote

This post has arisen out of the one about virtual memory but I'm starting a new thread because I don't want it to get lost in the mix.

I have been trying to answer my own question about USE of clrwin by commenting out the "use clrwin" statement and instead adding in explicit definitions of the various Salford @-functions - yes, there were one or two more than just winio@ Surprised but not I think enough to justify 280 MB :p . (At the moment, the answer appears to be that it makes no difference). In the process of doing this, I came across what appears to be a bug (two actually). After slashing and burning the code this is what I am left with:

program mainpr
use callbacks
iomain = winio@ ('%ti[icadam][]', ui_popup)
stop
end program mainpr

module callbacks
! use clrwin
character*256 clearwin_string@
external clearwin_string@
contains
!
integer function ui_popup ()
character (len = 256) treason
ui_popup = 2
treason = clearwin_string@ ('CALLBACK_REASON')
return
end function ui_popup
!
end module callbacks

When I try to build this code fragment, Mr Plato complains as follows:

WARNING the following symbols are missing:
CALLBACKS!CLEARWIN_STRING# E:resttechyftn95 bugsmissing symbolCheckMateWin32callba.obj
(E:RESTTECHYFTN95 BUGSMISSING SYMBOLCALLBA.F95)

And sure enough, if I run the executable, it bombs out the first time it needs to use clearwin_string@. However, if I comment out the two lines that define clearwin_string@ and uncomment out the "use clrwin" line instead - no problem.

Am I being Monday-braindead here or is FTN95 doing something it shouldn't?
Andy
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


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

PostPosted: Mon Jul 11, 2005 6:00 am    Post subject: clearwin_string@ and clrwin Reply with quote

Try declaring clearwin_string@ in the function rather than in the module header.
Back to top
View user's profile Send private message
sparge



Joined: 11 Apr 2005
Posts: 371

PostPosted: Mon Jul 11, 2005 7:16 am    Post subject: clearwin_string@ and clrwin Reply with quote

I already did, and it works. Begging the question, why does "use clrwin" in the module header work?
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


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

PostPosted: Mon Jul 11, 2005 8:29 am    Post subject: clearwin_string@ and clrwin Reply with quote

My guess is that the equivalent in the module header requires an interface of some kind.
To find out exactly why would take me some time to sort out and you have something that works and is cost effective.....

The alternative is to create your own module like clrwin but based on a subset of the corresponding Salford include file.
Back to top
View user's profile Send private message
sparge



Joined: 11 Apr 2005
Posts: 371

PostPosted: Tue Jul 12, 2005 3:38 am    Post subject: clearwin_string@ and clrwin Reply with quote

OK, OK! It appears there's no virtual memory benefit to be had by explicit declaration of only the @ functions required, rather than USE of clrwin, so it's an academic issue anyway, unless it's a symptom of a bigger issue. I only mentioned it because other @ functions (e.g. winio@, window_update@) do work in the module header as I would expect.

I'm more interested in a) why the applications I create have such a phenomenal virtual memory footprint and b) whether it might have any implications for installation on machines with minimal physical memory. If the answer to b) is yes, then the answer to a) becomes very interesting. Since I remain to be convinced that there is a logical reason why my little apps need to be hooked into two to three times as much of the OS as e.g. Lotus Notes, I am assuming that it does not and that this is an issue that could usefully be looked into.
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


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

PostPosted: Tue Jul 12, 2005 4:29 am    Post subject: clearwin_string@ and clrwin Reply with quote

Sorry but I do not know the answer to your question.
Maybe someone else can help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support 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