Results 1 to 2 of 2

Thread: [DEAD]To OpenSource SpeedBasic

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Okinawa, Japan
    Posts
    271

    [DEAD]To OpenSource SpeedBasic

    Hello all.
    Im thinking of completly open sourcing speedbasic and wanted to know if anyone would be interested in joining a team to perfect the
    language/translator.
    Everything except the translator is written in speedbasic.
    Dont need to know c++. If you know vb and how to call api from vb
    , as the language is very similiar, you can help create window controls
    for use with the language.
    The basic syntax code is translated to c++ and currently compiled by only mingw. Need to re-add support for all c++ compilers.
    Since the syntax is really similiar to vb a program will be created to convert vb code into speedbasic, minus the com controls, for now.
    Which would basically be vb without runtimes.

    Write now, the lang supports.

    - Classes.
    - Properties.
    - Creating exe and libraries without runtimes.
    - Standard Window Controls (written in speedbasic and compiled to library)
    - String functions

    Im currently re-writing the translator (in c++) to fix type casting and for better readability.

    Example of Lang syntax:
    class, class module>>
    VB Code:
    1. 'Control Class that handles the basic events/messages of all control windows
    2. 'Controls, like TextBox and CommandButton, use this as a base class and extend it to implement thier own msg and events.
    3. Using WinBase    'API's Declares,in basic Syntax.
    4. Using User32      'API's Declares,in basic Syntax.
    5. Using GDI32       'API's Declares,in basic Syntax.
    6. Using Kernel32    'API's Declares,in basic Syntax.
    7.  
    8. Class Control
    9.     Protected lastMessage As Long
    10.     Protected m_top As Integer
    11.     Protected m_left As Integer
    12.     Protected m_width As Integer
    13.     Protected m_height As Integer
    14.     Protected originalProc As Long
    15.     Protected p_hwnd As Long
    16.     Protected m_hwnd As Long
    17.     Protected beforeHwnd As Long
    18.     Protected resourceID As Long
    19.     Public IgnoreFocus As Boolean  
    20.     Public EventMsgGotFocus As Long
    21.     Public EventMsgLostFocus As Long
    22.     Public EventMsgMouseMove As Long
    23.     Public EventMsgMouseUp As Long
    24.     Public EventMsgMouseDown As Long
    25.     Public EventMsgKeyPress As Long
    26.     Public EventMsgKeyDown As Long
    27.     Public EventMsgKeyUp As Long
    28.  
    29.     Public m_Tag As Long
    30.  
    31.     Public ObjectPtr As Long
    32.     Public IndexNumber As Integer
    33.  
    34.     Private Function OnGotFocus()
    35.         'if EventMsgGotFocus is 0 then theres nothing to do
    36.         If EventMsgGotFocus=0 Then
    37.             'so return.
    38.             Exit Function
    39.         End If
    40.                           'ObjectPtr is > 0 if this control is used in a class.
    41.         If ObjectPtr=0 Then
    42.                                       'index number used for control arrays
    43.             If IndexNumber>=0 Then
    44.                                                    'declare a variable as a function so to say
    45.                 Dim funcptr As Function (iii As Integer)
    46.                                                    'set the address of the function
    47.                 funcptr=EventMsgGotFocus
    48.                                                    'call the function
    49.                 funcptr(IndexNumber)
    50.             Else
    51.                 Dim funcptr As Function()
    52.                 funcptr=EventMsgGotFocus
    53.                 funcptr()
    54.             End If
    55.         Else
    56.             If IndexNumber>0 Then
    57.                 Dim funcptr As Function (ooo As Long)
    58.                 funcptr=EventMsgGotFocus
    59.                 funcptr(ObjectPtr)
    60.             Else
    61.                 Dim funcptr As Function (ooo As Long, iii As Integer)
    62.                 funcptr=EventMsgGotFocus
    63.                 funcptr(ObjectPtr,IndexNumber)         
    64.             End If
    65.         End If
    66.     End Function
    67.              '...... more code
    68.     Public Property Set Left(pos As Integer)
    69.         m_left=pos
    70.         MoveWindow(m_hwnd,m_left,m_top,m_width,m_height,True)
    71.     End Property
    72.    
    73.     Public Property Get Left() As Integer
    74.         Left=m_left
    75.     End Property
    76. End Class

    Module>>
    VB Code:
    1. Dim thisApp As Application
    2. Dim txtUserName As TextBox
    3.  
    4. Public Function GuiInit(hinst As Long)
    5.    'create textbox,
    6.    txtUserName.Create(....)
    7.    'move the textbox over 10
    8.    txtUserName.Left=txtUserName.Left + 10
    9.    thisApp.run()
    10. End Function

    Would anyone be interested??
    Last edited by packetVB; Feb 22nd, 2006 at 09:42 AM.

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Okinawa, Japan
    Posts
    271

    Re: To OpenSource SpeedBasic

    Well,
    Ive come to the conclusion that there is little interest in a oop basic language without runtimes/basic to c++.

    Projects Dead

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width