fb:porticula NoPaste
yetlib.bas
Uploader: | Volta |
Datum/Zeit: | 25.05.2009 16:32:22 |
'mit fbc -dylib "yetlib.bas" 'Kompilieren', aber nicht 'Starten'
Declare Sub PrintAt Lib "yetlib" Alias "PrintAt" ( _
byRef Msg As String, _
Farbe As Integer=LoWord(Color), _
Zeile As Integer=CsrLin, _
Spalte As Integer=Pos _
) 'Spezialdeklation für PrintAt usw.
Declare Function Deg2Rad Lib "yetlib" Alias "Deg2Rad" _
(WinkelInDeg As Double) As Double 'soll einen Wert zurückgeben..
Declare Function Rad2Deg Lib "yetlib" Alias "Rad2Deg" _
(WinkelInRad As Double) As Double 'soll einen Wert zurückgeben..
Declare Function MenuChar Lib "yetlib" Alias "MenuChar" ( _
byVal MenuItem As String, _
byVal First As Integer=1, _
byVal nVG As Integer=12 _
) As String '12=hellrot
Declare Function GetKeyPress lib "yetlib" Alias "GetKeyPress" ( _
byVal Msg As String, _
byVal Allowed As String, _
byVal Upper As Integer=-1 _
) As String
Sub PrintAt( _
byRef Msg As String, _
Farbe As Integer=LoWord(Color), _
Zeile As Integer=CsrLin, _
Spalte As Integer=Pos _
) Export
Dim As Integer Alt=LoWord(Color)
Color Farbe
Locate Zeile, Spalte
?Msg
Color Alt
Input "Test", Msg
If Msg="" Then
Msg="Wasn?"
End If
End Sub
'soll einen Wert zurückgeben..
Function Deg2Rad(WinkelInDeg As Double) As Double Export
Return WinkelInDeg/45.0*Atn(1.0)
End Function
'soll einen Wert zurückgeben..
Function Rad2Deg(WinkelInRad As Double) As Double Export
Return WinkelInRad/Atn(1.0)*45.0
End Function
Function MenuChar( _
byVal MenuItem As String, _
byVal First As Integer=1, _
byVal nVG As Integer=12 _
) As String Export '12=hellrot
Dim cVG As Integer=LoWord(Color)
If First<>1 Then ?Left(MenuItem, First-1);
Color nVG
?Chr(MenuItem[First-1]);
Color cVG
Return Mid(MenuItem, First+1)
'ist nicht so schlimm, da der Benutzer ja sowieso lesen muß..
End Function
Function GetKeyPress( _
byVal Msg As String, _
byVal Allowed As String, _
byVal Upper As Integer=-1 _
) As String Export
Dim As String y=""
If Upper Then Allowed=UCase(Allowed)
If Msg<>"" Then ?Msg;
Do
y=Inkey
Sleep 1
If Upper Then y=UCase(y)
Loop Until Instr(Allowed, y)
Function=y
End Function