Pointer to String in VB2005

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Karl E. Peterson

    #61
    Re: Pointer to String in VB2005

    Rick Rothstein (MVP - VB) <rickNOSPAMnews @NOSPAMcomcast. netwrote:
    >>Elsewhere in this thread are posts where at least one other person in
    >>this
    >>group understands my position, and I feel content to leave it at that.
    >>
    >It's your contentedness to view the thread you started here as being to
    >"this group" that's at issue. Good thing you got a really thick skull,
    >'cause I think it's impending encounter with The Cluestick will almost
    >certainly test its limits!
    >
    What always amazes me about people like the OP for this thread is that after
    one visit to this group, they think they understand everything about it and
    feel free to reject the advice and counsel of those who have spent years
    volunteering their time here. It just boggles the mind that someone could
    have such a high opinion of themselves as to think they could not possibly
    be wrong.
    Okay, you didn't get the memo -- only one GWB comparison per thread! ;-)
    --
    ..NET: It's About Trust!



    Comment

    • Bob O`Bob

      #62
      Re: Pointer to String in VB2005

      alpine wrote:
      If you really have the best interest of your employer/clients and
      industry as a whole at heart, you'll exert your influence by letting
      the ignorant folks who are asking you to work in VB# know that using a
      proprietary MS language that MS doesn't write any of their own code in
      is a bad idea because MS has proven that they can't be trusted to
      protect any code invested in such language. Or you can just continue
      with the Baaaaaa, baaaaaa, baaaaaa.... If you act like a sheep then
      you'll be treated like a sheep and be herded around shorn and
      slaughtered at someone else's whim.

      I completely agree, though I would have used the word "respect" where you wrote "protect"


      Bob
      --

      Comment

      • Bob O`Bob

        #63
        Re: Pointer to String in VB2005

        Larry Serflaten wrote:
        You have got to admit there is a significant gap when the simplest of programs
        need a complete rewrite to do the same task:
        >
        Private Sub Form_Load()
        AutoRedraw = True
        Print "Hello World"
        End Sub
        >
        ....or when a simple wait-cursor class can't be implemented AT ALL.



        Bob
        --

        Comment

        • Larry Serflaten

          #64
          Re: Pointer to String in VB2005


          "Karl E. Peterson" <karl@mvps.orgw rote
          Of VB5's 95 statements, only 33 were also found as statements in VB2005.
          Of VB5's 140 functions, only 116 were found listed under functions for VB2005.

          That makes for 149 out of 235 possible commands where you'd find they
          were the same.
          >
          Not sure whether you intended "you would" or "you could" there? One of those is
          incorrect, of course, given they actually changed behavior (recycled) some commands.

          ....you'd find "they" were the same....

          Did you take that to mean the commands? The topic was about language differences.
          I made no distiction on functionality for the count. Return was listed as a statement in
          both languages, yet they differ in usage. I figured adding the statement about methodology
          had covered enough ground to also indicate there were more differences that were not
          apparent on the surface.

          LFS


          Comment

          • Paul Clement

            #65
            Re: Pointer to String in VB2005

            On Wed, 14 Feb 2007 11:48:17 -0600, "Larry Serflaten" <serflaten@usin ternet.comwrote :

            ¤
            ¤ "Paul Clement" <UseAdddressAtE ndofMessage@sws pectrum.comwrot e
            ¤
            ¤
            ¤ The problem is that several of them refer to the "core language" (absent of language extensions)
            ¤ only when it suits their argument. If you tell them that Microsoft has routinely broken code over
            ¤ the years with changes to the language extensions then they'll chime on about how the "core
            ¤ language" is what's truly important because it drives the "business logic" of their applications.
            ¤ However, if you point out that over 90% of the core language is still intact, then they'll challenge
            ¤ you run a Classic Visual Basic app through the upgrade wizard and then tell them that the
            ¤ "languages" are the same.
            ¤
            ¤
            ¤ Considering the language's Statements and Functions make up the lion's share of
            ¤ the 'core language', I just did a quick tally of VB5 against VB 2005:
            ¤
            ¤ VB5 Net Both
            ¤ Statements 95 51 33
            ¤ Functions 140 128 116
            ¤
            ¤
            ¤ Of VB5's 95 statements, only 33 were also found as statements in VB2005.
            ¤ Of VB5's 140 functions, only 116 were found listed under functions for VB2005.
            ¤
            ¤ That makes for 149 out of 235 possible commands where you'd find they
            ¤ were the same. That was a rough count, but on the surface they appear to
            ¤ be only about 65% the same....
            ¤
            ¤ And that does not take into account the difference in methodology of typical
            ¤ VB code compared to VB2005, such as; Event handling, Variable declarations,
            ¤ creating Objects, and of course 'Deterministic Finalization'.. ..
            ¤
            ¤ You have got to admit there is a significant gap when the simplest of programs
            ¤ need a complete rewrite to do the same task:
            ¤
            ¤ Private Sub Form_Load()
            ¤ AutoRedraw = True
            ¤ Print "Hello World"
            ¤ End Sub
            ¤

            Are you certain you checked all of the Visual Basic.NET namespaces? Did you include statements from
            Classic Visual Basic that are actually extensions to the language? For example, AutoRedraw is an
            extension to the language.


            Paul
            ~~~~
            Microsoft MVP (Visual Basic)

            Comment

            • Karl E. Peterson

              #66
              Re: Pointer to String in VB2005

              Larry Serflaten <serflaten@usin ternet.comwrote :
              "Karl E. Peterson" <karl@mvps.orgw rote
              >
              >>Of VB5's 95 statements, only 33 were also found as statements in VB2005.
              >>Of VB5's 140 functions, only 116 were found listed under functions for VB2005.
              >>>
              >>That makes for 149 out of 235 possible commands where you'd find they
              >>were the same.
              >>
              >Not sure whether you intended "you would" or "you could" there? One of those is
              >incorrect, of course, given they actually changed behavior (recycled) some
              >commands.
              >
              ...you'd find "they" were the same....
              >
              Did you take that to mean the commands? The topic was about language differences.
              I made no distiction on functionality for the count.
              Same keyword with different functionality equates to "not same" in my book.
              Return was listed as a
              statement in both languages, yet they differ in usage.
              That's the one, specifically, I had in mind, yep.
              I figured adding the
              statement about methodology had covered enough ground to also indicate there were
              more differences that were not apparent on the surface.
              I was just amplifying, not criticizing. Carry on... :-)
              --
              ..NET: It's About Trust!



              Comment

              • Robert Morley

                #67
                Re: Pointer to String in VB2005

                Where on EARTH did you see THAT? My impression of the whole thing was that
                the OP took exception to the tone of Karl's first reply, and would have been
                quite content to follow the instructions and move on to a .NET group, had it
                not been for that. Not once did I see him reject anybody's advice; in fact,
                he followed it in trimming a couple of the groups off the reply list.

                I think the real problem here is the letters "MVP"...it' s been misspelled.
                The correct letters should have been "EGO".



                Rob

                "Rick Rothstein (MVP - VB)" <rickNOSPAMnews @NOSPAMcomcast. netwrote in
                message news:uO8NKHHUHH A.5016@TK2MSFTN GP05.phx.gbl...
                >>Elsewhere in this thread are posts where at least one other person in
                >>this
                >>group understands my position, and I feel content to leave it at that.
                >>
                >It's your contentedness to view the thread you started here as being to
                >"this group" that's at issue. Good thing you got a really thick skull,
                >'cause I think it's impending encounter with The Cluestick will almost
                >certainly test its limits!
                >
                What always amazes me about people like the OP for this thread is that
                after one visit to this group, they think they understand everything about
                it and feel free to reject the advice and counsel of those who have spent
                years volunteering their time here. It just boggles the mind that someone
                could have such a high opinion of themselves as to think they could not
                possibly be wrong.
                >
                Rick
                >

                Comment

                • Tom Shelton

                  #68
                  Re: Pointer to String in VB2005

                  On Feb 14, 1:43 pm, Bob O`Bob <filter...@yaho ogroups.comwrot e:
                  Larry Serflaten wrote:
                  You have got to admit there is a significant gap when the simplest of programs
                  need a complete rewrite to do the same task:
                  >
                  Private Sub Form_Load()
                  AutoRedraw = True
                  Print "Hello World"
                  End Sub
                  >
                  ...or when a simple wait-cursor class can't be implemented AT ALL.
                  >
                  Bob
                  --
                  Private Sub button1_Click ( ByVal sender As Object, ByVal e As
                  EventArgs )
                  button1.Enabled = False
                  Using (WaitCursor wCursor = new WaitCursor ( Me))

                  ' do stuff
                  System.Threadin g.Thread.Sleep ( 10000 )
                  End Using
                  button1.Enabled = true
                  End Sub

                  Public Class WaitCursor
                  Implements IDisposable
                  Private frm As Form
                  Private currentCursor As Cursor

                  Public Sub New ( ByVal frm As Form)
                  Me.frm = frm
                  currentCursor = frm.Cursor
                  frm.Cursor = Cursors.WaitCur sor
                  End Sub


                  Public Sub Dispose ()
                  Me.form.Cursor = Me.currentCurso r
                  End Sub
                  End Class

                  Nope. Can't be done.

                  --
                  Tom Shelton

                  Comment

                  • Tom Shelton

                    #69
                    Re: Pointer to String in VB2005

                    On Feb 14, 5:44 pm, "Tom Shelton" <tom_shel...@co mcast.netwrote:
                    On Feb 14, 1:43 pm, Bob O`Bob <filter...@yaho ogroups.comwrot e:
                    >
                    Larry Serflaten wrote:
                    You have got to admit there is a significant gap when the simplest of programs
                    need a complete rewrite to do the same task:
                    >
                    Private Sub Form_Load()
                    AutoRedraw = True
                    Print "Hello World"
                    End Sub
                    >
                    ...or when a simple wait-cursor class can't be implemented AT ALL.
                    >
                    Bob
                    --
                    >
                    Private Sub button1_Click ( ByVal sender As Object, ByVal e As
                    EventArgs )
                    button1.Enabled = False
                    Using (WaitCursor wCursor = new WaitCursor ( Me))
                    >
                    ' do stuff
                    System.Threadin g.Thread.Sleep ( 10000 )
                    End Using
                    button1.Enabled = true
                    End Sub
                    >
                    Public Class WaitCursor
                    Implements IDisposable
                    Private frm As Form
                    Private currentCursor As Cursor
                    >
                    Public Sub New ( ByVal frm As Form)
                    Me.frm = frm
                    currentCursor = frm.Cursor
                    frm.Cursor = Cursors.WaitCur sor
                    End Sub
                    >
                    Public Sub Dispose ()
                    Me.form.Cursor = Me.currentCurso r
                    End Sub
                    End Class
                    >
                    Nope. Can't be done.
                    >
                    --
                    Tom Shelton
                    By the way, I forgot to include the handles clause on the button
                    click. But this was pretty much off the cuf anyway...

                    --
                    Tom Shelton

                    Comment

                    • Larry Serflaten

                      #70
                      Re: Pointer to String in VB2005


                      "Paul Clement" <UseAdddressAtE ndofMessage@sws pectrum.comwrot e
                      ¤ Considering the language's Statements and Functions make up the lion's share of
                      ¤ the 'core language', I just did a quick tally of VB5 against VB 2005:
                      ¤
                      ¤ VB5 Net Both
                      ¤ Statements 95 51 33
                      ¤ Functions 140 128 116
                      ¤
                      ¤
                      ....
                      ¤ You have got to admit there is a significant gap when the simplest of programs
                      ¤ need a complete rewrite to do the same task:
                      ¤
                      ¤ Private Sub Form_Load()
                      ¤ AutoRedraw = True
                      ¤ Print "Hello World"
                      ¤ End Sub
                      ¤
                      >
                      Are you certain you checked all of the Visual Basic.NET namespaces? Did you include statements from
                      Classic Visual Basic that are actually extensions to the language? For example, AutoRedraw is an
                      extension to the language.
                      As indicated, I went through the lists included under the language's Statements
                      and Functions sections in their respective Language Reference sections. I did
                      not look at properties (such as Form properties for AutoRedraw) nor did I
                      check any other classes/namespaces (such as System or other framework classes).

                      I said that at the start, and also indicated that these two sections make up the
                      lion's share of the 'core language'. Still, as was shown with the Hello World
                      example, there is a significant shift involved in the design and implementation
                      needed to do common tasks. That also has to contribute in the comparison
                      equation. While I would not disagree to a figure near 65%, you'd have to offer
                      some significant proof on your 90% similarity figure before I could let that go
                      unchallenged... .

                      They are simply too different to to even attempt to pass that figure off as fact....

                      LFS


                      Comment

                      • RobinS

                        #71
                        Re: Pointer to String in VB2005


                        "Tom Shelton" <tom_shelton@co mcast.netwrote in message
                        news:1171500430 .943934.154690@ l53g2000cwa.goo glegroups.com.. .
                        On Feb 14, 5:44 pm, "Tom Shelton" <tom_shel...@co mcast.netwrote:
                        >On Feb 14, 1:43 pm, Bob O`Bob <filter...@yaho ogroups.comwrot e:
                        >>
                        Larry Serflaten wrote:
                        You have got to admit there is a significant gap when the simplest
                        of programs
                        need a complete rewrite to do the same task:
                        >>
                        Private Sub Form_Load()
                        AutoRedraw = True
                        Print "Hello World"
                        End Sub
                        >>
                        ...or when a simple wait-cursor class can't be implemented AT ALL.
                        >>
                        Bob
                        --
                        >>
                        > Private Sub button1_Click ( ByVal sender As Object, ByVal e As
                        >EventArgs )
                        > button1.Enabled = False
                        > Using (WaitCursor wCursor = new WaitCursor ( Me))
                        >>
                        > ' do stuff
                        > System.Threadin g.Thread.Sleep ( 10000 )
                        > End Using
                        > button1.Enabled = true
                        > End Sub
                        >>
                        > Public Class WaitCursor
                        > Implements IDisposable
                        > Private frm As Form
                        > Private currentCursor As Cursor
                        >>
                        > Public Sub New ( ByVal frm As Form)
                        > Me.frm = frm
                        > currentCursor = frm.Cursor
                        > frm.Cursor = Cursors.WaitCur sor
                        > End Sub
                        >>
                        > Public Sub Dispose ()
                        > Me.form.Cursor = Me.currentCurso r
                        > End Sub
                        > End Class
                        >>
                        >Nope. Can't be done.
                        >>
                        >--
                        >Tom Shelton
                        >
                        By the way, I forgot to include the handles clause on the button
                        click. But this was pretty much off the cuf anyway...
                        >
                        --
                        Tom Shelton
                        >
                        And you left some C# in there.
                        > Using (WaitCursor wCursor = new WaitCursor ( Me))
                        should probably be

                        Using (wCursor as WaitCursor = new WaitCursor(Me))

                        :-)

                        Robin S.


                        Comment

                        • Tom Shelton

                          #72
                          Re: Pointer to String in VB2005

                          On 2007-02-15, RobinS <RobinS@NoSpam. yah.nonewrote:
                          >
                          "Tom Shelton" <tom_shelton@co mcast.netwrote in message
                          news:1171500430 .943934.154690@ l53g2000cwa.goo glegroups.com.. .
                          >On Feb 14, 5:44 pm, "Tom Shelton" <tom_shel...@co mcast.netwrote:
                          >>On Feb 14, 1:43 pm, Bob O`Bob <filter...@yaho ogroups.comwrot e:
                          >>>
                          >Larry Serflaten wrote:
                          >You have got to admit there is a significant gap when the simplest
                          >of programs
                          >need a complete rewrite to do the same task:
                          >>>
                          >Private Sub Form_Load()
                          > AutoRedraw = True
                          > Print "Hello World"
                          >End Sub
                          >>>
                          >...or when a simple wait-cursor class can't be implemented AT ALL.
                          >>>
                          > Bob
                          >--
                          >>>
                          >> Private Sub button1_Click ( ByVal sender As Object, ByVal e As
                          >>EventArgs )
                          >> button1.Enabled = False
                          >> Using (WaitCursor wCursor = new WaitCursor ( Me))
                          >>>
                          >> ' do stuff
                          >> System.Threadin g.Thread.Sleep ( 10000 )
                          >> End Using
                          >> button1.Enabled = true
                          >> End Sub
                          >>>
                          >> Public Class WaitCursor
                          >> Implements IDisposable
                          >> Private frm As Form
                          >> Private currentCursor As Cursor
                          >>>
                          >> Public Sub New ( ByVal frm As Form)
                          >> Me.frm = frm
                          >> currentCursor = frm.Cursor
                          >> frm.Cursor = Cursors.WaitCur sor
                          >> End Sub
                          >>>
                          >> Public Sub Dispose ()
                          >> Me.form.Cursor = Me.currentCurso r
                          >> End Sub
                          >> End Class
                          >>>
                          >>Nope. Can't be done.
                          >>>
                          >>--
                          >>Tom Shelton
                          >>
                          >By the way, I forgot to include the handles clause on the button
                          >click. But this was pretty much off the cuf anyway...
                          >>
                          >--
                          >Tom Shelton
                          >>
                          >
                          And you left some C# in there.
                          >
                          >> Using (WaitCursor wCursor = new WaitCursor ( Me))
                          >
                          should probably be
                          >
                          Using (wCursor as WaitCursor = new WaitCursor(Me))
                          >
                          >:-)
                          Yes... I did it off the cuff, and since I do most stuff in C# now - I
                          sometimes do funny things like add ;'s. Still, the I think the point was made.

                          --
                          Tom Shelton

                          Comment

                          • Herfried K. Wagner [MVP]

                            #73
                            Re: Pointer to String in VB2005

                            "Larry Serflaten" <serflaten@usin ternet.comschri eb:
                            Did you take that to mean the commands? The topic was about language
                            differences.
                            I made no distiction on functionality for the count. Return was listed as
                            a statement in
                            both languages, yet they differ in usage.
                            True, but on the other hand the 'String' function has been renamed to
                            'StrDup', which seems functionally equivalent to the VB6 'String' function.

                            I measure the difference between VB6 and VB.NET by the availability of a
                            conversion tool that allows seamless conversion between the two programming
                            langugages. As most tools fail, I consider the difference to be big
                            (currently).

                            --
                            M S Herfried K. Wagner
                            M V P <URL:http://dotnet.mvps.org/>
                            V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

                            Comment

                            • Herfried K. Wagner [MVP]

                              #74
                              Re: Pointer to String in VB2005

                              "RobinS" <RobinS@NoSpam. yah.noneschrieb :
                              And you left some C# in there.
                              >
                              >> Using (WaitCursor wCursor = new WaitCursor ( Me))
                              >
                              should probably be
                              >
                              Using (wCursor as WaitCursor = new WaitCursor(Me))
                              .... or even 'Using wCursor As New WaitCursor(Me)' .

                              --
                              M S Herfried K. Wagner
                              M V P <URL:http://dotnet.mvps.org/>
                              V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

                              Comment

                              • Herfried K. Wagner [MVP]

                                #75
                                Re: Pointer to String in VB2005

                                Paul,

                                "Paul Clement" <UseAdddressAtE ndofMessage@sws pectrum.comschr ieb:
                                ¤ Private Sub Form_Load()
                                ¤ AutoRedraw = True
                                ¤ Print "Hello World"
                                ¤ End Sub
                                ¤
                                >
                                Are you certain you checked all of the Visual Basic.NET namespaces? Did
                                you include statements from
                                Classic Visual Basic that are actually extensions to the language? For
                                example, AutoRedraw is an
                                extension to the language.
                                I think it's hard to draw the line between language and "extension to the
                                language" (library?) here. 'Load' and 'Unload' are statements, but they
                                targetting VB's forms and controls (which you seem to consider an extension
                                to the language). The '&' operator is clearly part of the language, but
                                'Right', 'Left', 'Mid', ... are part of a library.

                                My personal conclusion is that a distinction between language and language
                                extension (libraries that come with VB and are used in almost every VB
                                project extensively) doesn't make much sense here. The overall quality of
                                the migration support can be measured by the total effort it takes to
                                migrate a solution from VB6 to VB.NET, regardless of which components,
                                libraries, ... are used. I would not consider A to be a successor of B if
                                even the simplest program needs a manual rewrite, even if the core language
                                (its syntax) stayed completely intact and only support for the libraries has
                                been cancelled.

                                --
                                M S Herfried K. Wagner
                                M V P <URL:http://dotnet.mvps.org/>
                                V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

                                Comment

                                Working...