Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #2180

Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error

From "Blue Planet" <sorry@nospamme.org>
Newsgroups microsoft.public.vb.general.discussion, comp.lang.basic.visual.misc
Subject Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error
Date 2014-10-27 12:11 -0400
Organization Aioe.org NNTP Server
Message-ID <m2lqr8$dcb$1@speranza.aioe.org> (permalink)
References <m2aelp$t5s$1@speranza.aioe.org> <m2dlas$a3h$1@speranza.aioe.org>

Cross-posted to 2 groups.

Show all headers | View raw


"Deanna Earley" <dee.earley@icode.co.uk> wrote in message 
news:m2dlas$a3h$1@speranza.aioe.org...
> On 23/10/2014 09:35, Deanna Earley wrote:
>
> It turns out I'd accidentally introduced a Data = "" in the source 
> function that triggered the error as opposed to the original undimensioned 
> array which correctly returns an empty string.
> It must have been pure luck that I've not noticed it breaks with an 
> explicitly empty array until now...
> Thanks for everyone's comments.

Glad you found it.

This is one of the downsides of the "empty" vs. "unallocated" dynamic Byte 
array.  It would be nice if this didn't occur, however the "assignment of an 
empty String" trick itself was probably an unintended (those otherwise quite 
handy) side-effect.

If we ever got a VB 7.0 we'd be at risk of the trick being broken.  But then 
again a new VB might have addressed all of these issues through broader 
support for arrays, Strings, character encodings, etc.

Just one more thing the stubborn VB6 programmer needs to be aware of! ;) 

Back to comp.lang.basic.visual.misc | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

StrConv(ByteArray, vbUnicode) raising an "Out of memory" error Deanna Earley <dee.earley@icode.co.uk> - 2014-10-23 09:35 +0100
  Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error Arne Saknussemm <motz001.20.wannabet@spamgourmet.com> - 2014-10-23 10:39 +0200
    Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error Deanna Earley <dee.earley@icode.co.uk> - 2014-10-23 11:46 +0100
      Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error Arne Saknussemm <es215.10.wannabet@spamgourmet.com> - 2014-10-23 15:09 +0200
        Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error Deanna Earley <dee.earley@icode.co.uk> - 2014-10-23 14:28 +0100
  Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error "Farnsworth" <nospam@nospam.com> - 2014-10-23 08:04 -0400
    Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error "Farnsworth" <nospam@nospam.com> - 2014-10-23 08:35 -0400
  Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error "Farnsworth" <nospam@nospam.com> - 2014-10-23 11:48 -0400
    Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error Deanna Earley <dee.earley@icode.co.uk> - 2014-10-24 09:47 +0100
  Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error Deanna Earley <dee.earley@icode.co.uk> - 2014-10-24 14:47 +0100
    Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error Arne Saknussemm <es215.10.wannabet@spamgourmet.com> - 2014-10-27 12:32 +0100
      Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error Deanna Earley <dee.earley@icode.co.uk> - 2014-10-27 12:14 +0000
        Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error Arne Saknussemm <motz001.20.wannabet@spamgourmet.com> - 2014-10-28 11:22 +0100
    Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error "Blue Planet" <sorry@nospamme.org> - 2014-10-27 12:11 -0400
      Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error Deanna Earley <dee.earley@icode.co.uk> - 2014-10-27 16:26 +0000

csiph-web