Is there a way to construct a generic "list" by Fortran 95?
  Home FAQ Contact Sign in
comp.lang.fortran only
 
Advanced search
POPULAR GROUPS

more...

comp.lang.fortran Profile…
 Up
Is there a way to construct a generic "list" by Fortran 95?         


Author: Simulate
Date: Jan 21, 2008 17:29

In my finite element program, I want the Load, Element ..... are
defined by list type. If there is a generic list type can be defined
by Fortran 95, it will be convenience. Then, it can be difine:
Type(list) :: Load
Type(list) :: Element

....
call add(Load, i)
call add(Element, i)

...

A generic list type wtih its relative subroutines is easy to use.

Must I only define Load list, Element list ..... and their subroutines
individually?
17 Comments
Re: Is there a way to construct a generic "list" by Fortran 95?         


Author: Damian
Date: Jan 22, 2008 08:07

On Jan 21, 5:29 pm, Simulate gmail.com> wrote:
> In my finite element program, I want the Load, Element ..... are
> defined by list type. If there is a generic list type can be defined
> by Fortran 95, it will be convenience. Then, it can be difine:
> Type(list) :: Load
> Type(list) :: Element
>
> ....
> call add(Load, i)
> call add(Element, i)
>
> ...
>
> A generic list type wtih its relative subroutines is easy to use.
>
> Must I only define Load list, Element list ..... and their subroutines
> individually?
Show full article (1.36Kb)
no comments
Re: Is there a way to construct a generic "list" by Fortran 95?         


Author: James Giles
Date: Jan 22, 2008 11:12

Damian wrote:
> On Jan 21, 5:29 pm, Simulate gmail.com> wrote:
>> In my finite element program, I want the Load, Element ..... are
>> defined by list type. If there is a generic list type can be defined
>> by Fortran 95, it will be convenience. Then, it can be difine:
>> Type(list) :: Load
>> Type(list) :: Element
>>
>> ....
>> call add(Load, i)
>> call add(Element, i)
>>
>> ...
>>
>> A generic list type wtih its relative subroutines is easy to use.
>>
>> Must I only define Load list, Element list ..... and their
>> subroutines individually?
>
> ...
Show full article (2.06Kb)
no comments
Re: Is there a way to construct a generic "list" by Fortran 95?         


Author: garylscott
Date: Jan 22, 2008 14:45

On Jan 21, 7:29 pm, Simulate gmail.com> wrote:
> In my finite element program, I want the Load, Element ..... are
> defined by list type. If there is a generic list type can be defined
> by Fortran 95, it will be convenience. Then, it can be difine:
> Type(list) :: Load
> Type(list) :: Element
>
> ....
> call add(Load, i)
> call add(Element, i)
>
> ...
>
> A generic list type wtih its relative subroutines is easy to use.
>
> Must I only define Load list, Element list ..... and their subroutines
> individually?

Note that linked lists are patented. Usage may be hazzardous:

http://www.patentstorm.us/patents/7028023-fulltext.html
Show full article (0.66Kb)
no comments
Re: Is there a way to construct a generic "list" by Fortran 95?         


Author: Damian
Date: Jan 22, 2008 17:25

On Jan 22, 11:12 am, "James Giles" worldnet.att.net>
wrote:
> Damian wrote:
>> On Jan 21, 5:29 pm, Simulate gmail.com> wrote:
>>> In my finite element program, I want the Load, Element ..... are
>>> defined by list type. If there is a generic list type can be defined
>>> by Fortran 95, it will be convenience. Then, it can be difine:
>>> Type(list) :: Load
>>> Type(list) :: Element
>
>>> ....
>>> call add(Load, i)
>>> call add(Element, i)
>
>>> ...
>
>>> A generic list type wtih its relative subroutines is easy to use.
>
>>> Must I only define Load list, Element list ..... and their
>>> subroutines individually? ...
Show full article (6.69Kb)
no comments
Re: Is there a way to construct a generic "list" by Fortran 95?         


Author: Damian
Date: Jan 22, 2008 17:26

On Jan 22, 5:25 pm, Damian rouson.net> wrote:
> On Jan 22, 11:12 am, "James Giles" worldnet.att.net>
> wrote:
>
>
>
>> Damian wrote:
>>> On Jan 21, 5:29 pm, Simulate gmail.com> wrote:
>>>> In my finite element program, I want the Load, Element ..... are
>>>> defined by list type. If there is a generic list type can be defined
>>>> by Fortran 95, it will be convenience. Then, it can be difine:
>>>> Type(list) :: Load
>>>> Type(list) :: Element
>
>>>> ....
>>>> call add(Load, i)
>>>> call add(Element, i)
>
>>>> ...
> ...
Show full article (7.53Kb)
no comments
Re: Is there a way to construct a generic "list" by Fortran 95?         


Author: Simulate
Date: Jan 22, 2008 20:05

Thanks all!
Thanks Damian!
no comments
Re: Is there a way to construct a generic "list" by Fortran 95?         


Author: James Giles
Date: Jan 23, 2008 01:16

Damian wrote:
> On Jan 22, 11:12 am, "James Giles" worldnet.att.net>
> wrote:
>> Damian wrote:
...
>>> I'm guessing this will be a lot easier once more compilers support
>>> Fortran 2003, at which point you'll be able to use unlimited
>>> polymorphic entities [class(*)]. If you happen to be using the IBM
>>> XL Fortran compiler (or possibly the NAG compiler), you can take
>>> advantage of that feature now.
>>
>> Be aware that such is a very primitive capability. [...]
...
> I believe both the type safety issue and the desire for a generic
> array construct can be satisfied by the dynamic dispatching technique
> from Ed Akin's book cited in my previous post. [...]
Show full article (3.07Kb)
no comments
Re: Is there a way to construct a generic "list" by Fortran 95?         


Author: s8ngsu3
Date: Jan 23, 2008 02:50

On Jan 23, 12:45 am, garylsc...@sbcglobal.net wrote:
> Note that linked lists are patented.  Usage may be hazzardous:
>
> http://www.patentstorm.us/patents/7028023-fulltext.html

WTF? "US Patent Issued on April 11, 2006", and the linked lists have
been around for ages. Is this for real, or is it some perverted joke?
no comments
Re: Is there a way to construct a generic "list" by Fortran 95?         


Author: Gary Scott
Date: Jan 23, 2008 05:33

s8ngsu3@yahoo.com wrote:
> On Jan 23, 12:45 am, garylsc...@sbcglobal.net wrote:
>
>
>>Note that linked lists are patented. Usage may be hazzardous:
>>
>>http://www.patentstorm.us/patents/7028023-fulltext.html
>
>
> WTF? "US Patent Issued on April 11, 2006", and the linked lists have
> been around for ages. Is this for real, or is it some perverted joke?

It's kinda strange...

--

Gary Scott
mailto:garylscott@sbcglobal dot net

Fortran Library: http://www.fortranlib.com

Support the Original G95 Project: http://www.g95.org
-OR-
Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html
Show full article (0.73Kb)
no comments
1 2