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 

Linking with simple.dll

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



Joined: 07 Sep 2007
Posts: 6
Location: Politecnico di Torino - DENER

PostPosted: Mon Sep 17, 2007 3:41 pm    Post subject: Linking with simple.dll Reply with quote

Hi!

On the Plato3 FTN95 help I found:

As an alternative to the automatic mode described above, %pl can take the form:

winio@('%pl[user_drawn]’,width,height)

width and height give the pixel dimensions of a SIMPLEPLOT graphics region. There are no other arguments to go with %pl. Direct calls can be made to the SIMPLEPLOT library from within a %sc call-back. Alternatively you could use %lw and put the library calls after the set of winio@ statements that describe the window.

Here is a simple example that illustrates this approach.

c--Simple3.for
WINAPP
INTEGER winio@,i,StartCB
EXTERNAL StartCB
i=winio@('%sy[no_border]%ca[User drawn]&')
i=winio@('%pl[user_drawn]&',400,300)
i=winio@('%sc',StartCB)
END
c--The start-up callback
INTEGER FUNCTION StartCB()
INCLUDE 'CLEARWIN.INS'
INTEGER N,i
PARAMETER(N=101)
REAL x(N),y(N)
c--Create the data.
DO i=1,N
x(i)=i-1
y(i)=x(i)**2
ENDDO
c--Call SIMPLEPLOT routines to plot the graph.
CALL INITSP
CALL PAGE(12.0,10.0)
CALL CHSET(-11)
CALL NEWPAG
CALL TITLE7('Higher','Centre','Sample')
CALL SCALES(0.0,10.0,1,0.0,100.0,1)
CALL AXGRID('*Cartesian',1,-1)
CALL NEWPIC
CALL AXIS7('XCartesian','x-axis')
CALL AXIS7('YCartesian','y-axis')
CALL BRKNCV(x,y,N,-1)
CALL SIMPLEPLOT_REDRAW@
StartCB=1
END

When you link this program you must link with simple.dll.

Now, could you tell me how should I do to link with simple.dll?

(Sorry this will seem trivial for the most of you, but I never used that before)

Thanks!
Back to top
View user's profile Send private message MSN Messenger
PaulLaidler
Site Admin


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

PostPosted: Mon Sep 17, 2007 7:49 pm    Post subject: Reply with quote

Create a project if you have not already done so and then use the Project Explorer window to add a reference to the DLL.

Alternatively, from a command line in a DOS box, use SLINK. For example in interactive mode the commands are something like....

SLINK
lo prog.obj
lo simple.dll
file
Back to top
View user's profile Send private message AIM Address
danieletom-ramb



Joined: 07 Sep 2007
Posts: 6
Location: Politecnico di Torino - DENER

PostPosted: Tue Sep 18, 2007 9:11 am    Post subject: Reply with quote

Thanks Paul, I added simple.dll at Project ---> Add References, Is it enough?
Back to top
View user's profile Send private message MSN Messenger
PaulLaidler
Site Admin


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

PostPosted: Tue Sep 18, 2007 12:28 pm    Post subject: Reply with quote

Yes it should be enough.
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 -> 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