external library funtions?

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by endo.

hi,
i'm using PB-Amiga version.(first, sorry for my bad english)
how to use an external library function such as math.library/sin
for calculate a sinus? (or another thing..)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Mr.Skunk.

Sorry, can't help you cause i use the windows version for the moment, but look at the 'Library SDK' drawer of your PB.
If a function is not implemented, with the sdk, you can create a PB library to use it.


Mr Skunk
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by plouf.

i cant fint math.library but math libraries handle floating points
witch in amigaversion isnt supported yet e.g only byte .b word .w and lomg .l
witch are all integers
however to use library im amigaway is
;--PureBasic example
OpenDosLibrary_(40) ;first open the lib eg i open dos.library versio 40 or higher
; and do whatever you wand
something.s = "something"
PutStr_(something) ; put the string in output (console) buffered
End ; close program (purebasic closes libs )
;--Purebasic example end
you should alway add a _ after the fuction if you use external libraries
here the PutStr() became PutStr_()

christos
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by endo.

thanks guys!
Post Reply