Re: Inputbox Question



"DenBorg" <den_borg@xxxxxxxxx> wrote in message
news:1120840194.504029.106230@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Al Reid wrote:
>> The only problem here is that using "" an place of vbNullString
>> does *NOT* result in any "Bloat." In fact, once compiled, they
>> both result in exactly the same executable. WinDiff sees no
>> difference in the executables, other than the file date.
>
> That is an incorrect assumption.
>
> Create a new project, add a command button to Form1, and add the
> following sub:
>
> Private Sub Command1_Click()
> Dim S As String
>
> S = ""
> End Sub
>
> Copy the "S=" line so that there are 100 of them. Compile to
> Project1.exe
>
> Then replace all literal zero-length strings with either vbNullString
> or with your own constant. Compile to Project2.exe.
>
> The file size of Project1.exe and Project2.exe is different by 4K.

Not on my systems; the files are different but are the same size whether I
use vbNullString, my onw constant or "". I used native code optimized for
small code size with VB6 SP5.

--
Reply to the group so all can participate
VB.Net: "Fool me once..."

.


Loading