From: Mike Prager on
On Mon, 8 Mar 2010 23:29:36 -0800 (PST), Abbas Fakhari
<abbas.f2009(a)gmail.com> wrote:

>I want to generate a software for HVAC calculations in buildings (I am
>a Mechanical Engineer). So, I decided to have somebody write the GUI
>part with Visual Basic and me, myself, write the computational and
>mathematical parts using Fortran.
>
>Would you please help me with this! I want to know whether this is a
>good job or it is better to write both GUI and computational parts
>with Visual Fortran (as you know, GUI also can be written by Fortran).

I don't think anyone has mentioned yet that libraries are available
that will let you write the GUI in Fortran, perhaps at a higher level
that what using the compiler alone.

The commercial offerings I know of are GINO and Winteracter:

http://www.gino-graphics.com/

http://www.winteracter.com/

I have used GINO to do graphics and write GUIs; I believe you can buy
a subset of the product if you just want to write a GUI.

A less expensive option (180 USD for PC) is DISLIN. From the examples
on the home page, the current version would let you write a GUI.

http://www.dislin.de/

Using any of the above would let you avoid mixed-language programming.

Hope that helps.
From: glen herrmannsfeldt on
dpb <none(a)non.net> wrote:
(snip)

> Well, Craig, it looks like you're right...not only are they 0-based (and
> apparently that's immutable as it appears neither Option Base nor
> explicit subscripting ranges are implemented) the storage order is
> row-based a la C rather than column-based a la Fortran.

I have seen BASIC system where the DIM statement allocates an array
from 0 to N, such that N+1 elements are allocated. This allows programs
designed for either 0 or 1 origin to work, as long as you don't mix
them in the same program. That does complicate calls to other
languages, though.

-- glen
From: dpb on
glen herrmannsfeldt wrote:
> dpb <none(a)non.net> wrote:
> (snip)
>
>> Well, Craig, it looks like you're right...not only are they 0-based (and
>> apparently that's immutable as it appears neither Option Base nor
>> explicit subscripting ranges are implemented) the storage order is
>> row-based a la C rather than column-based a la Fortran.
>
> I have seen BASIC system where the DIM statement allocates an array
> from 0 to N, such that N+1 elements are allocated. This allows programs
> designed for either 0 or 1 origin to work, as long as you don't mix
> them in the same program. That does complicate calls to other
> languages, though.

Yes, but afaict that doesn't appear to be implemented in VB.NET even
though it was in VB5/VB6 ("Classic" VB).

What makes it "even worser" imo is the storage order problem. That was
a real blessing w/ VB and Fortran DLLs; now one has the same array order
issues as between Fortran and C. Logical decision if one is only
looking at one's proprietary and limited compatible languages that don't
include support of a Fortran compiler; not so nice for the person stuck
w/ moving code or wanting the GUI frontend to DLLs.

It's the MS VB.Net dialect that is the one in question here.

--
From: dpb on
Mike Prager wrote:
> On Mon, 8 Mar 2010 23:29:36 -0800 (PST), Abbas Fakhari
> <abbas.f2009(a)gmail.com> wrote:
>
>> I want to generate a software for HVAC calculations in buildings (I am
>> a Mechanical Engineer). So, I decided to have somebody write the GUI
>> part with Visual Basic and me, myself, write the computational and
>> mathematical parts using Fortran.
>>
>> Would you please help me with this! I want to know whether this is a
>> good job or it is better to write both GUI and computational parts
>> with Visual Fortran (as you know, GUI also can be written by Fortran).
>
> I don't think anyone has mentioned yet that libraries are available
> that will let you write the GUI in Fortran, perhaps at a higher level
> that what using the compiler alone.
>
> The commercial offerings I know of are GINO and Winteracter:
>
> http://www.gino-graphics.com/
>
> http://www.winteracter.com/
>
> I have used GINO to do graphics and write GUIs; I believe you can buy
> a subset of the product if you just want to write a GUI.
>
> A less expensive option (180 USD for PC) is DISLIN. From the examples
> on the home page, the current version would let you write a GUI.
>
> http://www.dislin.de/
>
> Using any of the above would let you avoid mixed-language programming.
>
> Hope that helps.

And, given what I just seemingly learned re: the VB.NET dialect, I'd
change my earlier recommendation to follow one of the above or even,
perhaps, the Tcl/Tk or similar route instead of VB.NET.

--
From: user1 on
dpb wrote:
> Mike Prager wrote:
>> On Mon, 8 Mar 2010 23:29:36 -0800 (PST), Abbas Fakhari
>> <abbas.f2009(a)gmail.com> wrote:
>>
>>> I want to generate a software for HVAC calculations in buildings (I am
>>> a Mechanical Engineer). So, I decided to have somebody write the GUI
>>> part with Visual Basic and me, myself, write the computational and
>>> mathematical parts using Fortran.
>>>
>>> Would you please help me with this! I want to know whether this is a
>>> good job or it is better to write both GUI and computational parts
>>> with Visual Fortran (as you know, GUI also can be written by Fortran).
>>
>> I don't think anyone has mentioned yet that libraries are available
>> that will let you write the GUI in Fortran, perhaps at a higher level
>> that what using the compiler alone.
>>
>> The commercial offerings I know of are GINO and Winteracter:
>>
>> http://www.gino-graphics.com/
>>
>> http://www.winteracter.com/
>>
>> I have used GINO to do graphics and write GUIs; I believe you can buy
>> a subset of the product if you just want to write a GUI.
>>
>> A less expensive option (180 USD for PC) is DISLIN. From the examples
>> on the home page, the current version would let you write a GUI.
>> http://www.dislin.de/
>>
>> Using any of the above would let you avoid mixed-language programming.
>>
>> Hope that helps.
>
> And, given what I just seemingly learned re: the VB.NET dialect, I'd
> change my earlier recommendation to follow one of the above or even,
> perhaps, the Tcl/Tk or similar route instead of VB.NET.
>

Otoh, perhaps you are dumping on VB.NET excessively. The row-major
storage would be no worse a problem than a C/C++ programmer might
encounter when trying to call Fortran numerical routines from something
like lapack, slatec, etc. Some reordering of arrays is needed on one
side or the other.

An all Fortran solution is nice, but maybe the guy working on the GUI is
not a Fortran guy.