derived-types Questions

0

Following on the heels of Mapped types in Scala Is there a way to mimic Pick, Exclude, Diff and etc. from Typescript in Scala? Using the a similar example as above: case class Person(name: Strin...
Carmelo asked 14/1, 2020 at 4:7

2

Solved

I am trying to write a constructor for a derived type of an abstract one to solve this other question, but it seems that it's not working, or better, it isn't called at all. The aim is to have a r...
Sycosis asked 2/11, 2019 at 6:11

2

Solved

I'm trying to compile the Fortran module below (using gfortran 7.2.0). The point is to define a derived type that in turn contains two instances of the derived type bspline_3d from the bspline-fort...
Nemertean asked 21/1, 2018 at 16:48

3

Solved

Algebraic Data Types (ADTs) in Haskell can automatically become instances of some typeclasses (like Show, Eq) by deriving from them. data Maybe a = Nothing | Just a deriving (Eq, Ord) My questi...
Krasnodar asked 5/10, 2010 at 14:29

1

Solved

Is it possible to store a procedure as a property of a derived type? I was thinking of something along the lines of: module funcs_mod public :: add contains function add(y,z) result (x) integ...
Immotile asked 8/12, 2015 at 22:28

1

I defined a derived type and encountered some problems with memory deallocation although I had written the final procedure. The code is as follows module ModuleCoordinate implicit none type :: ...
Gaillard asked 16/2, 2015 at 19:6

2

Solved

Is it possible to create a "derived type" from a type? Like extends in Java. For instance I need these types: create type mytype as ( f1 int, --many other fields... fn varchar(10) ); create t...
Behah asked 3/2, 2015 at 8:50

4

It seems Fortran 90 does not allow named constants in derived data types. Is this true? The following code does not work. program my_prog implicit none type :: my_type integer, parameter :: a = ...
Aborn asked 6/10, 2013 at 22:11

1

Solved

I want to pass a type bound procedures (as an external function) to another function as follows: module mod1 implicit none type type1 real :: a contains procedure,pass :: f end type contai...
Auriculate asked 2/6, 2014 at 18:50

1

Please note that I'm explicitly referencing SignalR 2.0 here ... I've seen some (nasty) approaches for this with SignalR 1.1/1.2 ... but none for 2.0 yet. Has anyone had any success with changing ...
Atlantic asked 20/10, 2013 at 2:41

1

Solved

I have a Fortran DLL which is called from a C program, and one of my procedures needs periodically to call a callback function which is supplied by the C program. I currently have it working well i...
Closer asked 16/1, 2014 at 22:51

2

I have the following data structure in a Fortran90 program: TYPE derivedType CHARACTER(100) :: name = ' ' INTEGER :: type = 0 REAL(KIND(1.0D0)) :: property = 0.0 END TYPE derivedType TYP...
Robyn asked 8/5, 2013 at 18:31

2

Solved

Assuming you want a list of arrays, each having the same size. Is it better performance-wise to use a 2D array : integer, allocatable :: data(:,:) or an array of derived types : type test inte...
Lymphosarcoma asked 12/8, 2013 at 12:43

1

Solved

I am ploughing through Learn You a Haskell for Great Good, and I have reached up to section 8.4, "Derived Instances". In this section, there's the following data type declaration: data Person = Pe...
Gypsophila asked 23/7, 2012 at 6:43

1

Solved

I have a parallel I/O project for parallel programming class, and I have to implement derived datatypes. I didn't clearly understand the difference between darray and subarray. Can darray be derive...
Minerva asked 19/4, 2011 at 12:56

2

I'm trying to create an XmlSerializer that serialize and deserializes derived types properly. Please take a look at the code below. Any assistance in using XmlAttributeOverrides ad extra types to c...
Mcwilliams asked 9/5, 2011 at 18:21
1

© 2022 - 2024 — McMap. All rights reserved.