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..)
external library funtions?
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
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
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
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm