Page 1 of 1
Posted: Wed Jun 27, 2001 4:45 pm
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..)
Posted: Wed Jun 27, 2001 8:31 pm
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
Posted: Thu Jun 28, 2001 9:07 pm
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
Posted: Fri Jun 29, 2001 2:42 pm
by BackupUser
Restored from previous forum. Originally posted by endo.
thanks guys!