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