source: branches/nanovis2/oldtest/src/RpUnitsF_test.f @ 3305

Last change on this file since 3305 was 3305, checked in by ldelgass, 12 years ago

sync with trunk

File size: 1.2 KB
Line 
1c ----------------------------------------------------------------------
2c  TEST: Fortran's interface to RpUnits.
3c
4c  Basic units conversion tests for the RpUnits portion of Rappture
5c  written in Fortran.
6c ======================================================================
7c  AUTHOR:  Derrick Kearney, Purdue University
8c  Copyright (c) 2004-2012  HUBzero Foundation, LLC
9c
10c  See the file "license.terms" for information on usage and
11c  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
12c ======================================================================
13      program units_test
14        IMPLICIT NONE
15
16        integer rp_units_convert_str
17        integer rp_units_convert_dbl
18
19        double precision dblVal
20        character*40 retStr
21        integer retVal
22
23        retVal = rp_units_convert_str("72F","C",retStr)
24        print *,"72F = ",retStr
25        print *,"correct retVal = 22.222C",retVal
26        print *,"retVal = ",retVal
27
28        retVal = rp_units_convert_dbl("72F","C",dblVal)
29        print *,"72F = ",dblVal, " (no units)"
30        print *,"correct retVal = 22.222",retVal
31        print *,"retVal = ",retVal
32
33      end program units_test
34
Note: See TracBrowser for help on using the repository browser.