⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 f2c.ps

📁 tsai经典标定程序 MATLAB语言
💻 PS
📖 第 1 页 / 共 5 页
字号:
(man)4868 2463 w10 R f(page telling how to use)4 927 1 720 2583 t10 I f(f 2c)1 138 1 1672 2583 t10 R f(.)1810 2583 w10 B f(2. INTERLANGUAGE CONVENTIONS)2 1765 1 720 2915 t10 R f(Much of the material in this section is taken from [6].)10 2139 1 970 3098 t10 B f(Names)720 3430 w10 R f(An)970 3613 w10 I f(f 2c)1 138 1 1122 3613 t10 R f( \(until recently called Fortran 8x [2]\) is that long names are)11 2431(extension inspired by Fortran 90)4 1319 2 1290 3613 t(allowed \()1 380 1 720 3733 t10 I f(f 2c)1 138 1 1100 3733 t10 R f( To)1 166( 50 characters\), and names may contain underscores.)7 2137(truncates names that are longer than)5 1468 3 1269 3733 t( and with names that)4 875(avoid con\257ict with the names of library routines)7 2000 2 720 3853 t10 I f(f 2c)1 138 1 3632 3853 t10 R f(generates, Fortran names may)3 1233 1 3807 3853 t( lower case \(unless the)4 967( names are forced to)4 876( Fortran)1 361(have one or two underscores appended.)5 1658 4 720 3973 t10 CW f(-U)4623 3973 w10 R f(option)4784 3973 w( names of Fortran procedures and common)6 1767(described in Appendix B is in effect\); external names, i.e., the)10 2553 2 720 4093 t( contain any underscores and have a pair of under-)9 2031(blocks, have a single underscore appended if they do not)9 2289 2 720 4213 t( named)1 316( Fortran subroutines)2 853( Thus)1 274(scores appended if they do contain underscores.)6 2053 4 720 4333 t10 CW f(ABC)4266 4333 w10 R f(,)4446 4333 w10 CW f(A_B_C)4521 4333 w10 R f(, and)1 219 1 4821 4333 t10 CW f(A_B_C_)720 4453 w10 R f(result in C functions named)4 1105 1 1105 4453 t10 CW f(abc_)2235 4453 w10 R f(,)2475 4453 w10 CW f(a_b_c_ _)1 444 1 2525 4453 t10 R f(, and)1 194 1 2969 4453 t10 CW f(a_b_c_ _ _)2 528 1 3188 4453 t10 R f(.)3716 4453 w10 B f(Types)720 4785 w10 R f( use types)2 442(The table below shows corresponding Fortran and C declarations; the C declarations)11 3628 2 970 4968 t(de\256ned in)1 414 1 720 5088 t10 CW f(f2c.h)1176 5088 w10 R f(, a header \256le upon which)5 1116 1 1476 5088 t10 I f(f 2c)1 138 1 2634 5088 t10 R f( table also shows the C types)6 1251( The)1 221( rely.)1 221('s translations)1 575 4 2772 5088 t(de\256ned in the standard version of)5 1334 1 720 5208 t10 CW f(f2c.h)2079 5208 w10 R f(.)2379 5208 w10 S f(_ _______________________________________________________)1 2789 1 1485 5334 t10 R f( standard)1 948(Fortran C)1 1059 2 1757 5454 t10 CW f(f2c.h)3789 5454 w10 R f(integer)1535 5634 w10 S f(*)1812 5634 w10 R f( int x;)2 234( short)1 660( x;)1 103( shortint)1 742(2 x)1 125 5 1862 5634 t( int x;)2 234( long)1 667( x;)1 103( integer)1 813(integer x)1 352 5 1535 5754 t( int x;)2 234( long)1 635( int x;)2 234( long)1 719(logical x)1 347 5 1535 5874 t( x;)1 103( \257oat)1 795( x;)1 103( real)1 813(real x)1 224 5 1535 5994 t( x;)1 103( double)1 617( x;)1 103( doublereal)1 571(double precision x)2 738 5 1535 6114 t( { \257oat r, i; } x;)6 616( struct)1 644( x;)1 103( complex)1 813(complex x)1 419 5 1535 6234 t( { double r, i; } x;)6 710( struct)1 372( x;)1 103( doublecomplex)1 788(double complex x)2 716 5 1535 6354 t(character)1535 6474 w10 S f(*)1899 6474 w10 R f( x[6];)1 219( char)1 650( x[6];)1 219( char)1 520(6 x)1 125 5 1949 6474 t10 S f( \347)1 -2789(_ _______________________________________________________)1 2789 2 1485 6494 t(\347)1485 6434 w(\347)1485 6334 w(\347)1485 6234 w(\347)1485 6134 w(\347)1485 6034 w(\347)1485 5934 w(\347)1485 5834 w(\347)1485 5734 w(\347)1485 5634 w(\347)1485 5534 w(\347)1485 5434 w(\347)4274 6494 w(\347)4274 6434 w(\347)4274 6334 w(\347)4274 6234 w(\347)4274 6134 w(\347)4274 6034 w(\347)4274 5934 w(\347)4274 5834 w(\347)4274 5734 w(\347)4274 5634 w(\347)4274 5534 w(\347)4274 5434 w10 R f(By the rules of Fortran,)4 951 1 720 6720 t10 CW f(integer, logical,)1 990 1 1700 6720 t10 R f(and)2720 6720 w10 CW f(real)2894 6720 w10 R f(data occupy the same amount of memory, and)7 1876 1 3164 6720 t10 CW f(double precision)1 965 1 720 6840 t10 R f(and)1715 6840 w10 CW f(complex)1889 6840 w10 R f(occupy twice this amount;)3 1064 1 2339 6840 t10 I f(f 2c)1 138 1 3432 6840 t10 R f(assumes that the types in the C col-)7 1441 1 3599 6840 t( \(in)1 151(umn above are chosen)3 931 2 720 6960 t10 CW f(f2c.h)1842 6960 w10 R f( translations of the Fortran)4 1120( The)1 220(\) so that these assumptions are valid.)6 1558 3 2142 6960 t10 CW f(equivalence)720 7080 w10 R f(and)1408 7080 w10 CW f(data)1580 7080 w10 R f( some machines, one must modify)5 1376( On)1 174(statements depend on these assumptions.)4 1643 3 1847 7080 t10 CW f(f2c.h)720 7200 w10 R f( \2476 for examples and further discussion.)6 1600( See)1 194(to make these assumptions hold.)4 1297 3 1045 7200 t10 R f(October 8, 1991)2 646 1 2544 7560 tcleartomarkshowpagesaveobj restore%%EndPage: 2 3%%Page: 3 4/saveobj save defmark4 pagesetup10 R f(- 3 -)2 166 1 2797 480 t10 B f(Return Values)1 619 1 720 840 t10 R f(A function of type)3 753 1 970 998 t10 CW f(integer)1754 998 w10 R f(,)2174 998 w10 CW f(logical)2230 998 w10 R f(, or)1 139 1 2650 998 t10 CW f(double precision)1 966 1 2820 998 t10 R f(must be declared as a C func-)6 1222 1 3818 998 t( the)1 148( If)1 117(tion that returns the corresponding type.)5 1603 3 720 1118 t10 CW f(-R)2613 1118 w10 R f(option is in effect \(see Appendix B\), the same is true of a)12 2282 1 2758 1118 t(function of type)2 694 1 720 1238 t10 CW f(real)1467 1238 w10 R f(; otherwise, a)2 591 1 1707 1238 t10 CW f(real)2351 1238 w10 R f( as a C function that returns)6 1278(function must be declared)3 1118 2 2644 1238 t10 CW f(doublereal)720 1358 w10 R f(; this hack facilitates our VAX regression testing, as it duplicates the behavior of our local)15 3720 1 1320 1358 t(Fortran compiler \()2 738 1 720 1478 t10 I f(f)1458 1478 w10 R f(77\). A)1 283 1 1502 1478 t10 CW f(complex)1814 1478 w10 R f(or)2263 1478 w10 CW f(double complex)1 844 1 2375 1478 t10 R f(function is equivalent to a C routine with an)8 1792 1 3248 1478 t( Thus,)1 275(additional initial argument that points to the place where the return value is to be stored.)15 3518 2 720 1598 t9 CW f(complex function f\( . . . \))6 1458 1 1008 1761 t10 R f(is equivalent to)2 611 1 720 1944 t9 CW f(void f_\(temp, . . .\))4 1080 1 1008 2107 t(complex)1008 2207 w9 S f(*)1440 2207 w9 CW f(temp;)1485 2207 w(. . .)2 270 1 1062 2307 t10 R f( equivalent to a C routine with two extra initial arguments: a data address and)14 3110(A character-valued function is)3 1210 2 720 2490 t( Thus,)1 275(a length.)1 344 2 720 2610 t9 CW f(character)1008 2773 w9 S f(*)1494 2773 w9 CW f(15 function g\( . . . \))6 1188 1 1539 2773 t10 R f(is equivalent to)2 611 1 720 2956 t9 CW f(g_\(result, length, . . .\))4 1350 1 1008 3119 t(char)1008 3219 w9 S f(*)1278 3219 w9 CW f(result;)1323 3219 w(ftnlen length;)1 756 1 1008 3319 t(. . .)2 270 1 1062 3419 t10 R f(and could be invoked in C by)6 1177 1 720 3602 t9 CW f(char chars[15];)1 810 1 1008 3765 t(. . .)2 270 1 1062 3865 t(g_\(chars, 15L, . . . \);)5 1242 1 1008 3965 t10 R f(Subroutines are invoked as if they were)6 1598 1 720 4148 t10 CW f(int)2346 4148 w10 R f(-valued functions whose value speci\256es which alternate return)7 2514 1 2526 4148 t( an)1 125( return arguments \(statement labels\) are not passed to the function, but are used to do)15 3499( Alternate)1 428(to use.)1 268 4 720 4268 t( entry points with alternate return argu-)6 1617( the subroutine has no)4 905( \(If)1 156(indexed branch in the calling procedure.)5 1642 4 720 4388 t( statement)1 408( The)1 205(ments, the returned value is unde\256ned.\))5 1578 3 720 4508 t9 CW f(call nret\()1 540 1 1008 4671 t9 S f(*)1548 4671 w9 CW f(1,)1593 4671 w9 S f(*)1755 4671 w9 CW f(2,)1800 4671 w9 S f(*)1962 4671 w9 CW f(3\))2007 4671 w10 R f(is treated exactly as if it were the Fortran computed)9 2054 1 720 4854 t10 CW f(goto)2799 4854 w9 CW f( \))1 108( nret\()1 378(goto \(1, 2, 3\),)3 810 3 1008 5017 t10 B f(Argument Lists)1 669 1 720 5262 t10 R f( addition, for every non-function argument that is of)8 2115( In)1 137( address.)1 353(All Fortran arguments are passed by)5 1465 4 970 5420 t( string lengths are)3 728( \(The)1 243( length of the value is passed.)6 1209(type character, an argument giving the)5 1565 4 720 5540 t10 CW f(ftnlen)4495 5540 w10 R f(val-)4885 5540 w(ues, i.e.,)1 335 1 720 5660 t10 CW f(long int)1 485 1 1085 5660 t10 R f( of arguments is: extra arguments)5 1364( summary, the order)3 819( In)1 138(quantities passed by value\).)3 1119 4 1600 5660 t( function, and a)3 621(for complex and character functions, an address for each datum or)10 2649 2 720 5780 t10 CW f(ftnlen)4015 5780 w10 R f(for each charac-)2 640 1 4400 5780 t( the call in)3 419( Thus,)1 275(ter argument \(other than character-valued functions\).)5 2110 3 720 5900 t9 CW f(external f)1 540 1 1008 6063 t(character)1008 6163 w9 S f(*)1494 6163 w9 CW f(7 s)1 162 1 1539 6163 t(integer b\(3\))1 648 1 1008 6263 t(. . .)2 270 1 1062 6363 t(call sam\(f, b\(2\), s\))3 1080 1 1008 6463 t10 R f(is equivalent to that in)4 889 1 720 6646 t9 CW f(int f\(\);)1 432 1 1008 6809 t(char s[7];)1 540 1 1008 6909 t(long int b[3];)2 756 1 1008 7009 t(. . .)2 270 1 1062 7109 t(sam_\(f, &b[1], s, 7L\);)3 1188 1 1008 7209 t10 R f(October 8, 1991)2 646 1 2544 7560 tcleartomarkshowpagesaveobj restore%%EndPage: 3 4%%Page: 4 5/saveobj save defmark5 pagesetup10 R f(- 4 -)2 166 1 2797 480 t( arrays begin at 1 by default.)6 1175(Note that the \256rst element of a C array always has subscript zero, but Fortran)14 3145 2 720 840 t( whereas C arrays are stored in row-major order,)8 1983(Because Fortran arrays are stored in column-major order,)7 2337 2 720 960 t10 I f(f 2c)1 138 1 720 1080 t10 R f( arrays into one-dimensional C arrays and issues appropriate sub-)9 2681(translates multi-dimensional Fortran)2 1469 2 890 1080 t(scripting expressions.)1 866 1 720 1200 t10 B f(3. EXTENSIONS TO FORTRAN 77)4 1560 1 720 1460 t10 R f(Since it is derived from)4 938 1 970 1622 t10 I f(f)1933 1622 w10 R f(77,)1977 1622 w10 I f(f 2c)1 138 1 2127 1622 t10 R f(supports all of the)3 719 1 2290 1622 t10 I f(f)3035 1622 w10 R f(77 extensions described in [6].)4 1227 1 3079 1622 t10 I f(F 2c)1 163 1 4357 1622 t10 R f('s extensions)1 520 1 4520 1622 t(include the following.)2 880 1 720 1742 t10 S f(\267)720 1922 w10 R f(Type)791 1922 w10 CW f(double complex)1 854 1 1035 1922 t10 R f(\(alias)1928 1922 w10 CW f(complex*16)2183 1922 w10 R f(\) is a double-precision version of)5 1387 1 2783 1922 t10 CW f(complex)4209 1922 w10 R f(. Speci\256c)1 411 1 4629 1922 t( for)1 148(intrinsic functions)1 733 2 791 2042 t10 CW f(double complex)1 847 1 1704 2042 t10 R f(have names that start with)4 1071 1 2583 2042 t10 CW f(z)3686 2042 w10 R f(rather than)1 436 1 3778 2042 t10 CW f(c)4246 2042 w10 R f( exception to)2 530(. An)1 204 2 4306 2042 t(this rule is)2 425 1 791 2162 t10 CW f(dimag)1245 2162 w10 R f( of a)2 187(, which returns the imaginary part)5 1373 2 1545 2162 t10 CW f(double complex)1 845 1 3135 2162 t10 R f(value;)4010 2162 w10 CW f(imag)4284 2162 w10 R f(is the corre-)2 486 1 4554 2162 t( generic intrinsic function)3 1035( The)1 207(sponding generic intrinsic function.)3 1430 3 791 2282 t10 CW f(real)3490 2282 w10 R f(is extended so that it returns the)6 1283 1 3757 2282 t(real part of a)3 509 1 791 2402 t10 CW f(double complex)1 841 1 1326 2402 t10 R f(value as a)2 395 1 2193 2402 t10 CW f(double precision)1 961 1 2614 2402 t10 R f(value;)3601 2402 w10 CW f(dble)3871 2402 w10 R f(is the speci\256c intrinsic)3 903 1 4137 2402 t(function that does this job.)4 1064 1 791 2522 t10 S f(\267)720 2702 w10 R f(The ``types'' that may appear in an)6 1425 1 791 2702 t10 CW f(implicit)2244 2702 w10 R f(statement include)1 705 1 2752 2702 t10 CW f(undefined)3485 2702 w10 R f( vari-)1 217(, which implies that)3 798 2 4025 2702 t(ables whose names begin with the associated letters must be explicitly declared in a type statement.)15 4032 1 791 2822 t10 I f(F 2c)1 163 1 4877 2822 t10 R f(also recognizes the Fortran 90 statement)5 1611 1 791 2942 t9 CW f(implicit none)1 702 1 1008 3112 t10 R f(as equivalent to)2 627 1 791 3302 t9 CW f(implicit undefined\(a-z\))1 1242 1 1008 3472 t10 R f(The command-line option)2 1038 1 791 3662 t10 CW f(-u)1854 3662 w10 R f(has the effect of inserting)4 1014 1 1999 3662 t9 CW f(implicit none)1 702 1 1008 3832 t10 R f(at the beginning of each Fortran procedure.)6 1726 1 791 4022 t10 S f(\267)720 4202 w10 R f( themselves recursively, i.e., may call themselves either directly or indirectly through)11 3436(Procedures may call)2 813 2 791 4202 t(a chain of other calls.)4 856 1 791 4322 t10 S f(\267)720 4502 w10 R f(The keywords)1 579 1 791 4502 t10 CW f(static)1406 4502 w10 R f(and)1802 4502 w10 CW f(automatic)1982 4502 w10 R f(act as ``types'' in type and implicit statements; they specify)9 2482 1 2558 4502 t( of each)2 325( is exactly one copy)4 817( There)1 288(storage classes.)1 621 4 791 4622 t10 CW f(static)2872 4622 w10 R f(variable, and such variables retain their val-)6 1778 1 3262 4622 t( of a)2 189( the other hand, each invocation)5 1300( On)1 177(ues between invocations of the procedure in which they appear.)9 2583 4 791 4742 t(procedure gets new copies of the procedure's)6 1877 1 791 4862 t10 CW f(automatic)2705 4862 w10 R f(variables.)3282 4862 w10 CW f(Automatic)3729 4862 w

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -