Execution result
E: /fortran_g95> appgetname 3 4 11 15 16 12 <br/> star name method <br/> 3 earth Earth Month + moon <br/> 4 MARS and Mars <br/> 11 sun and Sun <br/> 15 days of migration from the moon to librations <br/> 12 Solar System Center solarbary solar system 0 <br/> OK </P> <p> E: /fortran_g95>
Source code:
! C --------------------------------------------------------------- <br/>! The main program starts! <Br/>! C program <br/> Program Main <br/> implicit double precision (A-G) <br/> integer nargin, I, Qi (16), qlen, In, J, XH <br/> character * 128 argum (10) <br/> character * 130 tmpstr </P> <p>! Parameter processing <br/> nargin = iargc () <br/> Doi = 1, nargin <br/> call getarg (I, argum (I), qlen) <br/> end do </P> <p> If (nargin. eq.0) Go to 11 </P> <p>! Test function <br/> write (*, '(A4, 3a12)') "asterisk", "star name", "name ", "method" </P> <p> Doi = 1, nargin <br/> Read (argum (I), '(I2)', err = 11) XH <br/> If (XH. le.0.or. XH. gt.15) cycle <br/> call showxxnames (XH) <br/> end do <br/> stop "OK" <br/>! /// // <Br /> 11do I = 1, 15 <br/> call showxxnames (I) <br/> end do <br/> stop "parameter error. Enter an asterisk. Format: exe ii [1-15] (n) "<br/> end program <br/>! ++ ++ <Br/>! Main program ended <br/>! ++ ++ </P> <p> include "getname. f90"
Source code: getname. f90
! C --------------------------------------------------------------- <br/>! Output three names of the specified asterisk <br/>! C ------------------------------------------------------------- <br/> subroutineshowxxnames (XH) <br/> integer I, XH <br/>! Function declaration <br/> character * 10 getxxname_cn, Beijing, getxxdata_cn, getxxtype_cn <br/> external getxxname_cn, getxxname_en, getxxdata_cn, getxxtype_cn </P> <p> write (*, '(I4, 3a12)') XH, getxxname_cn (XH), getxxname_en (XH), getxxtype_cn (XH) <br/> end <br/>! ++ ++ <Br/>! Star name <br/>! C producer <br/> function getxxname_cn (XH) <br/> character * 10 xname (15), getxxname_cn <br/> integer I, XH <br/> data (xname (I), I =)/'merce', 'venus ', 'global', 'marker ', 'Jupiter '/<br/> data (xname (I), I = 6, 9)/'saturn', 'neptune ', 'uranus ', 'pluto '/<br/> data (xname (I), I = 10, 12)/'lunar', 'sun ', 'solar center centroy'/<br/> data (xname (I), I = 13, 15)/'Moon system centroid ', 'zhangdong ', 'lunar tianyun'/</P> <p> getxxname_cn = xname (XH) <br/> RET Urn <br/> end <br/>! ++ ++ <Br/>! Star name <br/>! C producer <br/> function getxxname_en (XH) <br/> character * 10 xname (15), getxxname_en <br/> integer I, XH <br/> data (xname (I), I = 1, 4)/'mercury', 'venus', 'global ', 'Mars '/<br/> data (xname (I), I = 5, 8)/'Jupiter', 'saturn', 'uranus ', 'neptune '/<br/> data (xname (I), I = 9, 12)/'pluto', 'Moon', 'sun ', 'solarbary'/<br/> data (xname (I), I = 13, 14)/'earthmbary', 'nutation S '/<br/> data (xname (I), I = 15, 15)/'librations'/</P> <p> getxxname_en = xname (XH) <br/> return <br/> end <br/>! ++ ++ <Br/>! Retrieve the data star name <br/>! C producer <br/> function getxxdata_cn (XH) <br/> character * 10 xname (15), getxxdata_cn <br/> integer I, XH <br/> data (xname (I), I =)/'merce', 'venus ', 'Land and month', 'Mars ', 'Jupiter '/<br/> data (xname (I), I = 6, 9)/'saturn', 'neptune ', 'uranus ', 'pluto '/<br/> data (xname (I), I = 10, 12)/'lunar', 'sun ', 'zhangdong '/<br/> data (xname (I), I = 13, 13)/'lunar tianyun'/</P> <p> getxxdata_cn = xname (XH) <br/> return <br/> end <br />! ++ ++ <Br/>! Data Retrieval Method <br/>! C producer <br/> function getxxtype_cn (XH) <br/> character * 10 xname (15), getxxtype_cn <br/> integer I, XH <br/> data (xname (I), I =)/'merce', 'venus ', 'Moon + lunar', 'Mars ', 'Jupiter '/<br/> data (xname (I), I = 6, 9)/'saturn', 'neptune ', 'uranus ', 'pluto '/<br/> data (xname (I), I = 10, 12)/'Moon-moon. ', 'sun', '0 in the Solar System'/<br/> data (xname (I), I = 13, 15)/'Land and month', 'zhangdong ', 'tianyunyun '/</P> <p> getxxtype_cn = xname (XH) <br/> Return <br/> end <br/>! ++ ++ <Br/>! Program ended <br/>! ++ ++ <Br/>
Note that the Code will use the f90 format from now on.
Group 1050
3 171 231 309 342 366 387 405 423 441 753 819 899
14 10 13 11 8 7 6 6 6 13 11 10 10
4 2 2 1 1 1 1 1 1 8 2 4 4
Group 1070
The first line indicates the start data item.
The second line indicates the number of coefficient items.
The third line indicates the date part.
Implicit, attribute.
Except for 2X2, there are 4 items in total, and the others are 3x2, with 6 items in total.
Row 2 * Row 3 * Number of attribute items = Total number of planetary items
The addition of the number of planetary items + 2 is ksize/2.