Re: VarPtr and passing variables by ref




"dpb" <none@xxxxxxx> wrote in message news:frhjn6$sg2$1@xxxxxxxxxxx
Ralph wrote:
...
C/C++ coding is just dead characters in a text file until you compile
it. VB
is not.

For some reason my reader reopened this thread here and I saw this
sentence for the first time...that makes all the difference in the world
in understanding the communication gap here.

There's the problem--VB code is also nothing but a text file until it is
compiled (whether to pcode or .exe form), no different than any other
compiled language.

That the VS editor is syntax-aware also may make it look like there's
something else going on, or the background compilation that is an early
form of JIT compilation, but there really isn't--you can just as well
(altho less conveniently) write all the code in any text editor and
compile it outside the IDE just as w/ C/C++. Or, as long as you
followed the rules for file format, etc., use another editor and then
simply open those files in the IDE.

Of course, given the highly integrated nature of VS w/ VB it wouldn't
make much sense to do that, but it is possible.

--

Major communication problem all right, as it is not possible unless one
reverse-engineered their own VB6.exe.

The VB IDE only uses "text" files - FRMs, CLSs, BASs, ... as 'mnemonics'.
(I'lll mercifully leave designer out of the discussion. <g>) The files are
loaded into temp buffers (internal buffers, temp files), the IDE then
performs syntax checking as well creating symbol tables, caches,
jump_tables, etc. as the 'text' is converted to pcode/opcode (more below*).
This becomes stored 'opcode' within the IDE, The 'text' portion of the code
that you see in the editor is a 'View' to the underlying pcode. It is NOT a
view of the file.

You can best observe this phenomena with 'spell-checking'. When you type
something VBA immediately parses it (syntax checking, symbol table
comparisons, convertion to opcode), this opcode is immediately converted
back to text and presented back to the User.

[You can also witness this when VB appears to get confused. Close and
re-open the project and all's well again, though not a single line of code
has changed.]

*One the problems with with discussing VB's internals, is it is essentially
non-documented. We know that VB is based on 'pcode'. Pcode is properly the
tokenized executable code. Within the IDE it exists in two main states: 1)
opcode - tokenized parsed code, and 2) excode - tokenized executable code.
Think of the first as snippets, the latter as packaged snippets. When VB
does an internal 'compile' (compile on demand, or background) it is
converting opcode to excode. Excode is executable within the IDE but must be
further 'packaged' as pcode or native code to run outside the IDE.

But as MikeD reminded me - none of this actually makes any difference to the
normal or even professional user - the results are the same - no matter what
actually may be going on below the surface. He is right - I should never
have gone there. <g>

-ralph




.



Relevant Pages

  • Re: Subclassing compilation crash
    ... > subclassing off, the IDE no longer crashes. ... > I do have - and always have had - such code to reset the window proc. ... > However, during compilation, the first two message boxes pop up just ...
    (microsoft.public.vb.general.discussion)
  • Re: Easier Way to Conditional Compile?
    ... currently running in the IDE or not. ... >> and off with a conditional compilation argument during IDE development. ... >> the app, then go back in and change the value back. ... > then you can test for the underscore character anytime at run time to ...
    (microsoft.public.vb.general.discussion)
  • Re: Curiousity: Order of Procedures
    ... the IDE isn't actually using the "file" while its working. ... usually given to explain why an alphabetic arrangement helped. ... I seriously doubt that even in VB3, there was anything in the transfer to pcode ... given the wide spread use of sorts and binary search ...
    (microsoft.public.vb.general.discussion)
  • Re: Remote Compilation
    ... > We would like to know how you use remote compilation. ... IDE copies files through FTP to server. ...
    (comp.lang.cobol)
  • Remote Compilation
    ... We would like to know how you use remote compilation. ... IDE copies files through FTP to server. ...
    (comp.lang.cobol)

Quantcast