Announcement

Collapse
No announcement yet.

VB to PB Concordance

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • VB to PB Concordance

    Hello All,

    This is a zip containing an ODS spreadsheet named "PBWin10 Keywords". The file contains 3 sheets:

    1. PBWin 10 keywords;
    2. VB6 keywords;
    3 Concordance.

    I'm the first to admit I don't know everything about PBwin and even less about VB6. (It has been sooo long.) This file represents a summary of everything I know about the equivalences between VB and PB. The PB commands are left-hand col in alphabetical order. The VB stuff is mostly in alphabetical order, but I sort by PB.

    It might help converts from VB. I intend to use it to keep track of how my own Alpha Converter deals with VB.

    Comments/additions/corrections welcome.

    Stan
    Attached Files
    Do not go quiet into that good night,
    ... Rage, rage against the dark.

  • #2
    Originally posted by StanHelton View Post
    Hello All,

    This is a zip containing an ODS spreadsheet named "PBWin10 Keywords". The file contains 3 sheets:

    1. PBWin 10 keywords;
    2. VB6 keywords;
    3 Concordance.

    I'm the first to admit I don't know everything about PBwin and even less about VB6. (It has been sooo long.) This file represents a summary of everything I know about the equivalences between VB and PB. The PB commands are left-hand col in alphabetical order. The VB stuff is mostly in alphabetical order, but I sort by PB.

    It might help converts from VB. I intend to use it to keep track of how my own Alpha Converter deals with VB.

    Comments/additions/corrections welcome.

    Stan
    Hey Stan... you may want to go ahead and just save the files inside the ZIP out to a DOC or TXT file before zipping them up. Right now you zipped up a ODS file which I don't believe is necessary (even thou it's just another form of ZIP) but includes tons of other unnecessary files that are all in XML format. Would be alot easier on everyone else if it were in a standard DOC or TXT file format that we all could read without having to rely on a spreadsheet program to view. Just a thought...

    -=> Jim! <=-
    Even if you think you don’t love mathematics,
    mathematics loves you. Don’t believe me?
    Solve the following for “i”.
    9x – 7i > 3(3x – 7u)

    Comment


    • #3
      Originally posted by James Davis View Post
      Hey Stan... you may want to go ahead and just save the files inside the ZIP out to a DOC or TXT file before zipping them up. Right now you zipped up a ODS file which I don't believe is necessary (even thou it's just another form of ZIP)
      Jim, ODS is Open Document Standard as used by OpenOffice for example. See wiki here.

      Comment


      • #4
        Originally posted by Chris Holbrook View Post
        Jim, ODS is Open Document Standard as used by OpenOffice for example. See wiki here.
        And yet there are some of us that don't use Office at all. I don't... only thing I use is Wordpad or Notepad.
        Even if you think you don’t love mathematics,
        mathematics loves you. Don’t believe me?
        Solve the following for “i”.
        9x – 7i > 3(3x – 7u)

        Comment


        • #5
          For those of you without OpenOffice:

          This zip contains 2 files, both carry the same information -- The 3rd sheet of the previous file -- Concordance.

          One file in XLS format.
          One file in CVS format.

          You're welcome, Jim.
          Attached Files
          Do not go quiet into that good night,
          ... Rage, rage against the dark.

          Comment


          • #6
            That worked alot better! Thanks Stan!
            Even if you think you don’t love mathematics,
            mathematics loves you. Don’t believe me?
            Solve the following for “i”.
            9x – 7i > 3(3x – 7u)

            Comment


            • #7
              Stan, how/where did you get the PBWin keyword list?
              Cheers
              -

              Comment


              • #8
                Wayne,

                Originally posted by Wayne Diamond View Post
                Stan, how/where did you get the PBWin keyword list?
                Cheers
                I pulled it manually out of the PB Help that shipped with my copy of 10.3. Actually, I type pretty fast so it wasn't that big a deal and a lot more reliable than cut & paste for my money. I left out the built-in equates because, well, it seemed redundant considering this group of folks. I also skipped syntax & notes on most of the PB stuff without a VB equivalent.

                The VB list is less complete. It's drawn from a PDF I found online, a little MSDN to verify the shaky definitions, and just a little bit from my own limited library of VB stuff. There's just enough there to get started.

                Stan
                Do not go quiet into that good night,
                ... Rage, rage against the dark.

                Comment


                • #9
                  Originally posted by Chris Holbrook View Post
                  Jim, ODS is Open Document Standard as used by OpenOffice for example. See wiki here.
                  And ODS is what? A ZIP file containing a bunch of other files. ZIPing it again doesn't gain you much more compression. That's what Jim was after.

                  BTW, same goes for MS Office 2007 and up files. docx, xlsx ... all are ZIP files. Try it yourself: rename them to *.zip and open them with your favorite archiver.

                  Comment


                  • #10
                    Yup, Knuth is correct - open a *.docx or similar .x office file in a hex editor and it starts out with the PK zip header
                    It's not exactly just "a .doc in a .zip" as it contains folder structures, but for all intents and purposes that's how it could be viewed
                    Last edited by Wayne Diamond; 21 Aug 2014, 11:01 AM.
                    -

                    Comment


                    • #11
                      The VB6 programming reference for the language, controls and other things is here:

                      Gain technical skills through documentation and training, earn certifications and connect with the community

                      Comment


                      • #12
                        BTW, folks, I just recall one advantage (or quirk, depending from which side you're looking at it) of VB: Your own (public) procedure will overwrite a built-in procedure with similar name. I'm using the following CreateObject() function, for example:
                        Code:
                        Public Function CreateObject(ByVal sClass As String, Optional ByVal sServerName As String = vbNullString) As Object
                        '------------------------------------------------------------------------------
                        'Purpose  : Override the CreateObject function in order to register what object
                        '           is being created in any error message that's generated.
                        '
                        '   Author: Darin Higgins
                        '   Source: http://www.darinhiggins.com/the-vb6-createobject-function/
                        '  Changed: 10.04.2014
                        '           - Reformatted to accomodate my coding style
                        '------------------------------------------------------------------------------
                        Dim sSource As String, sDescr As String, lErrNum As Long
                        
                        On Error Resume Next
                        
                        If Len(sServerName) Then
                           Set CreateObject = VBA.CreateObject(sClass, sServerName)
                        Else
                           Set CreateObject = VBA.CreateObject(sClass)
                        End If
                        
                        If VBA.Err Then
                           sSource = VBA.Err.Source
                           sDescr = VBA.Err.Description
                           lErrNum = VBA.Err
                           sDescr = sDescr & " (ProgID: " & sClass
                           If Len(sServerName) Then
                              sDescr = sDescr & ". Instantiated on Server '" & sServerName & "'"
                           End If
                           sDescr = sDescr & ")"
                           
                           On Error GoTo 0
                           
                           VBA.Err.Raise lErrNum, sSource, sDescr
                        End If
                        
                        On Error GoTo 0
                        
                        End Function
                        So, when parsing VB code and stumbling over a supposed-to-be VB procedure, you need to scan the rest of the project in order to figure out if there isn't a user-created equivalent.

                        Comment


                        • #13
                          Udated Concordance - Help if you have a minute

                          My first idea was to use a detailed Concordance in the initial translations. I discarded that idea a few weeks ago, but have been unable to come up with a better, faster idea so I'm back to my original idea. Right now I'm working backwards from PB to Vb in an effort to get the Vb info filled out.

                          I've updated the Concordance. This is the version I'm using, as a set of DATA statements. I have two problems with it:

                          Sheet #1: Most of these VB6 "terms" are objects. Aside from the object syntax, which I have, any notes you may have on actual usage would be helpful. I have PBRow INC files for all the standard VB 6.0 Enterprise OCX files. Allowing the Translator to use VB6 objects requires the related OCX files to be in the same directory. Depending on programming style Jose Roca's TypeLib produces better results so I'm probably going to give the end-user the option, different styles of programming.

                          Sheet #2: Here's where I ask for a little of your time, if you have a few minutes to look at the "Concordance" sheet and fill in a missing VB6 term or two with it's associated syntax, please. I'm pretty sure the ones I have are correct, but there are many I cannot find. (Please don't suggest I look at the MSDN; this represents what I've been able to dig out of that.) If you know for a fact that the VB6 approximation of a listed PB Win 10 term is an object reference, please let me know which object you think might be best.

                          Syntax notes (very basic):
                          {} for mandatory choice, 2 or more options
                          [] for optional args/subterms
                          | delimiter for choices in either of {} or []
                          () in syntax string denotes required parentheses
                          () in code string denotes args/subterms

                          all brackets may be nested as required

                          ****
                          If you post a reply here all I need is the PBWin10 term or function and your suggested VB6 approximation. I'm happy to plug it in and do the testing.

                          The Concordance.ods.zip is an ODS spreedsheet for OpenOffice or LibreOffice. Zip = 45K, ODS = 47K.
                          Attached Files
                          Do not go quiet into that good night,
                          ... Rage, rage against the dark.

                          Comment

                          Working...
                          X
                          😀
                          🥰
                          🤢
                          😎
                          😡
                          👍
                          👎