Re: BSTR and Allocatable arrays



On Wed, 28 Sep 2005 15:31:02 -0400, "apm"
<Contributor@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

>The BSTR (the Microsoft Visual C/C++ name, String in VB) stores its length
>(like the Fortran allocatable array) but it can also be cast to an array of
>two byte elements. Does the Fortran standard specify anything about how the
>allocatable array is implemented in binary? Anyone how it appears in binary?

Just because a BSTR has a separate length that does not make it in any way
similar to a Fortran allocatable array. The Fortran standard says little if
nothing on the machine representation of an allocatable array, but even if it
did, that would not help you at all in accessing BSTRs.

Intel Visual Fortran and Compaq Visual Fortran (and perhaps other compilers)
provide routines for reading and writing BSTRs and SafeArrays. If you'd like
more pointers and an example, ask in our user forum (link below).

My recollection is that the data in a BSTR is UNICODE.

Steve Lionel
Software Products Division
Intel Corporation
Nashua, NH

User communities for Intel Software Development Products
http://softwareforums.intel.com/
Intel Fortran Support
http://developer.intel.com/software/products/support/
.



Relevant Pages

  • Re: pointer plus an integer
    ... That's Fortran 90. ... The biggest attraction to f77 was the dynamically allocatable array, ... f2003 allows interoperabiltiy with C, but there is no full-fledged compiler ...
    (comp.lang.c)
  • deallocating via pointer associated with allocatable array
    ... Section 6.5.3 in Fortran 95/2003 explained: ... a pointer that is associated with the whole of a target that was ... this excludes a pointer that is associated with an allocatable array}" ... Does this mean the deallocate statement at the end of the following program ...
    (comp.lang.fortran)
  • Re: Dynamic array size reallocation
    ... This is more intended as a mechanism that is an allocatable array ... equivalent of pointer assignment (see "Fortran 95/2003 Explained", ... Mike Metcalf ...
    (comp.lang.fortran)
  • Re: bye bye IVF (was: bye bye CVF)
    ... >> I personally thought CVF was a great product. ... >> one is expected to migrate to IVF. ... If Intel, in contrast to AMD, can't even get its chip microcode right, why ... The Help button is not yet supported in the Fortran AppWizard ...
    (comp.lang.fortran)
  • Re: Free Fortran compiler that handles Cray-style pointers available?
    ... kindly replied to my posting there that Salford Fortran '95 for Windows ... Personal Edition can run in a Cygwin shell, but doesn't support ... what is Intel IIRC Fortran? ... Visual Fortran Compiler for Windows 8.1 or something else? ...
    (comp.lang.fortran)