From: Eduardo on
dpb escribi�:

> I don't recall VB ever barfing or returning wrong/unexpected results in
> my usage.

I don't recall either.
And I can't find the post (so far).
From: Schmidt on

"Eduardo" <mm(a)mm.com> schrieb im Newsbeitrag news:hb1sfn$38g$1(a)aioe.org...

> One thing: I've read somewhere (I think it was Ken Halter
> who said that here in the NG) that working with the return
> value in a function was dangerous because it could cause problems.
So far I'm using that kind of "direct-placement in return-values"
quite often - it is (especially with String-returning-function,
which interact directly with API-Calls) mostly faster, avoiding
extra-allocations and extra-copies of VBs heap-allocated
variable-types - no surprises so far here.

Though (not sure about Kens advises)...

I placed something like a "warning" some time ago here in the
NG - with regards to "fast String-Functions" that deal directly
on passed ByteBuffers or Pointers - and (for speed-reasons)
involve the SysAllocStringByteLen-API.
This API is able to avoid explicit preallocation of the String-
Destination-Buffers, normally done beforehand with the "more
conventional" Space$(...) function - it can do all that (allocation
and copy-over) in "one go".

But this API, although working stable for a long time, behaves not
that reliable anymore (at least in conjunction with VB-BSTR-Code)
on todays Win-OSes (maybe due to a servicepack, or whatever).
I suspect the OLEAut-String-Caching, which seems to work a bit
different now on todays OSes, but not sure.

But the outlined explicit prealloc over Space$(...), followed by a
CopyMemory-call for the copy-over is only about 10-15%
slower than SysAllocStringByteLen - so, not all that much
of a loss.

Olaf


From: samiah banaag on


Good eve...

Please help me naman oh for a simple game using either array, stacks,
queue or link lists... Even a simple game can do....
please........


*** Sent via Developersdex http://www.developersdex.com ***
From: Larry Serflaten on

"samiah banaag" <braverly_samiah(a)yahoo.com> wrote
> Good eve...
>
> Please help me naman oh for a simple game using either array, stacks,
> queue or link lists... Even a simple game can do....
> please........


Search google: Towers of Hanoi

LFS