OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gdb/] [gdb-6.8/] [gdb/] [testsuite/] [gdb.fortran/] [derived-type.f90] - Blame information for rev 25

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 25 jlechner
! Copyright 2006 Free Software Foundation, Inc.
2
!
3
! This program is free software; you can redistribute it and/or modify
4
! it under the terms of the GNU General Public License as published by
5
! the Free Software Foundation; either version 3 of the License, or
6
! (at your option) any later version.
7
!
8
! This program is distributed in the hope that it will be useful,
9
! but WITHOUT ANY WARRANTY; without even the implied warranty of
10
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
! GNU General Public License for more details.
12
!
13
! You should have received a copy of the GNU General Public License
14
! along with this program.  If not, see .
15
!
16
! Ihis file is the Fortran source file for derived-type.exp.  It was written
17
! by Wu Zhou. (woodzltc@cn.ibm.com)
18
 
19
program main
20
 
21
  type bar
22
    integer :: c
23
    real :: d
24
  end type
25
  type foo
26
    real :: a
27
    type(bar) :: x
28
    character*7 :: b
29
  end type foo
30
  type(foo) :: q
31
  type(bar) :: p
32
 
33
  p = bar(1, 2.375)
34
  q%a = 3.125
35
  q%b = "abcdefg"
36
  q%x%c = 1
37
  q%x%d = 2.375
38
  print *,p,q
39
 
40
end program main

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.