°Æµ{¦¡¥¿¦p¨ä¦W¡A¥»¨´N¨ã¦³¤@Ó§¹µ½ªºµ{¦¡¬[ºc¡C«e±©Ò¤¶²Ðªº®æ¦¡¡B«Å§i¡B¿é¥X¤J¡B¹Bºâ¦¡¡B°j°é¡B§PÂ_¡BÀÉ®×µ¥¡A³£¥i¥H¦b°Æµ{¦¡¤¤¨Ï¥Î¡A¬Æ¦Ü°Æµ{¦¡ùØÀY¤]¥i¥H¦A©I¥s°Æµ{¦¡¡C
¦b¤U¦C¨âºØ±¡ªp¤§¤U§ÚÌ·|¼¶¼g©Î¨Ï¥Î°Æµ{¦¡¡G
(1) ¬°¤FÅýµ{¦¡ªºµ²ºc²M·¡¡A¦Ó§â¬YÓ¯S®í³¡¤À¥\¯à¿W¥ß¥X¨Ó¡AÅý¥¦¦Û¦¨¤@Óµ{¦¡¡A¦A¥Ñ¥Dµ{¦¡¨Ó¥s¥Î¡C¦ó¦p¼g¤@ӰƵ{¦¡±M¥q³]©wªì©lÈ¡A¥t¤@Ó¥uºÞ¦Û¥~³¡Åª¤J¸ê°T¡A¦A¤@Ó±Mªùpºâ¡A¤S¦A¤@Ó±MºÞ¦C¦Lµª®×¤Î§@¹Ï¡C
(2) ¦³¨Çµ{¦¡¬q¸¨¡]¦pø¹Ï¤Î¹Bºâ½ÆÂøªº¼Æ¾Ç¨ç¦¡¡^¡A¥i¥H«ÂЦa³Q¦P¤@өΤ£¦Pªºµ{¦¡¨Ó¨Ï¥Î¡A§Ú̳£·|§Æ±æ§â³oºØ¤u¨ã©Êªº¡B¥i«ÂШϥΪºµ{¦¡¤ù¬q¼g¦¨°Æµ{¦¡¡A¤£¦ý²³æ¤è«K¡A¤]¥i´î¤Ö¿ù»~¡C
°Æµ{¦¡ªº¤º®e¡A¬O©w¸q¦b SUBROUTINE "°Æµ{¦¡¦W(¤Þ¼Æ¸s)" »P END ¤§¶¡¡C³o©M¥Dµ{¦¡¬O©w¸q¦b PROGRAM "¥Dµ{¦¡¦W" »P END ¤§¶¡¦³ÂI¹³¡A¦ý°Æµ{¦¡¦h¤F¤@Ó RETURN «ü¥O¨Óªð¦^¥Dµ{¦¡¡A³o¦b¥Dµ{¦¡¤¤¬O¨S¦³ªº¡C
µ{¦¡ªº¥Îªk¦p¤U¡G
PROGRAM MY_MAIN REAL A,B,C
CALL MY_SUB(A,B,C)
END |
SUBROUTINE MY_SUB(AA,BB,CC) REAL AA,BB,CC
CC = AA + BB
RETURN END |
¤@¯ë¦Ó¨¥¡A°Æµ{¦¡»Ýn±q¥Dµ{¦¡³B±o¨ì¤@¨Ç¸ê°T¡A¨Ó§@¬°³B²zªº¨Ì¾Ú¡A¦bpºâ«á¤~¶Ç¦^µ²ªG¥Î¨ì¥Dµ{¦¡¤¤¡C§ÚÌ¥i¥H·Q¹³¡A¦P¤@ӰƵ{¦¡¦³¥i¯à·|¦b¦P¤@Óµ{¦¡ªº¤£¦P¦a¤è¡A¬Æ¦Ü¬O¤£¦Pªºµ{¦¡©Ò¨Ï¥Î¡A¦]¦¹°Æµ{¦¡¤§¤º©Ò©w¸qªº¦WºÙµ´¹ï¤£¥i¯àè¦n©M¥Dµ{¦¡n¥ÎªºÅܼƦWºÙ¤@¼Ò¤@¼Ë¡C¡]¨Ò¦p¡G±M§â¤@ӶǤJ¼ÆÈ°µ¥¤èªº°Æµ{¦¡¡A¦b¥Dµ{¦¡¦³¥i¯à¥ý«á³Q©I¥s¡A¨Ó§@¬°¨D A ©M B ªº¥¤è¤§¥Î¡C¦]¦¹°Æµ{¦¡¤¤¯u¥¿§@ A1 = A1**2 ªºÅܼơAµ´¹ï¤£¥i¯àº¡¨¬¦WºÙ¬Û¦Pªºn¨D¡C¡^¬JµMÅܼƦWºÙ¤£¯à¤@¼Ò¤@¼Ë¡A§ÚÌ«h¥u¯à°÷¥H¶Ç»¼®É¡AÅܼƱƦCªº¥ý«á¡A¨Ó§@¥D¡B°Æµ{¦¡¤§Åܼƪº¤@¹ï¤@¹ïÀ³¡A¦p¦¹´Nµ´¹ï¤£·|¶Ç¿ù¡C¦b¼¶¼g©Î¬O¥s¥Î°Æµ{¦¡®É¤]½Ð¤j®aª`·N¡C
ÁöµM¥D¡B°Æµ{¦¡¤¤¹ïÀ³ªºÅܼƦWºÙ¥i¥H¤£¦P¡A¦ý¬O¼ÆÈ«¬ºAªº«Å§i¤@©wn¤@P¡A§_«h³oºØ¤£¦X²zª¬ªp±N¾ÉP»yªk¿ù»~µLªk½sĶ¡C