資源描述:
《PFC手冊fish翻譯中英文.講義.doc》由會員上傳分享,免費在線閱讀,更多相關內容在教育資源-天天文庫。
1、2FISHREFERENCE2.1IntroductionandOverview簡介和概述ThissectioncontainsadetailedreferencetotheFISHlanguage.Followingtheintroduction,Section2.2describestherulesofthelanguageandhowvariablesandfunctionsareused.Section2.3explainsFISHstatementsandSection2.4describeshowtheFISHlanguagelinkswithPFC2D.Pre-defin
2、edFISHvariables,functionsandarraysaredescribedinSection2.5.這部分包含FISH語言的詳細參考。接下來,2.2描述語言規(guī)則及如何運用變量和函數。2.3解釋FISH陳述。2.4描述FISH語言如何與PFC聯系在一起。2.5講述如何預定義FISH變量、函數和數列。FISHisaprogramminglanguageembeddedwithinPFC2Dthatenablestheusertodefinenewvariablesandfunctions.ThesefunctionsmaybeusedtoextendPFC2D’susef
3、ulnessoradduserdefinedfeatures.Forexample,newvariablesmaybeplottedorprinted,specialparticlegeneratorsmaybeimplemented,servo-controlmaybeappliedtoanumericaltest,unusualdistributionsofpropertiesmaybespecified,andparameterstudiesmaybeautomated.FISH是PFC內置的一種編程語言,用戶可以自定義變量和函數。這些函數可用來擴展PFC的功能,或者增加用戶定義
4、的特征。例如:輸出或者打印新的變量、實現特殊的顆粒生成、數值測試中中應用伺服控制、定義特殊的顆粒分布以及自動研究參數。FISHisa“compiler”(ratherthanan“interpreter”).ProgramsenteredviaaPFC2Ddatafilearetranslatedintoalistofinstructions(in“pseudo-code”)storedinPFC2D’smemoryspace;theoriginalsourceprogramisnotretainedbyPFC2D.WheneveraFISHfunctionisinvoked,itsc
5、ompiledpseudo-codeisexecuted.Theuseofcompiledcode—ratherthaninterpretedsourcecode—enablesprogramstorunmuchfaster.However,unlikeacompiler,variablenamesandvaluesareavailableforprintingatanytime;valuesmaybemodifiedbytheuserbyusingPFC2D’sSETcommand.FISH是一個編程員,而不是一個翻譯員。通過PFC數據文件輸入的程序轉化成一連串命令(以“pseudo
6、指令”的形式)儲存在PFC的存儲空間。PFC沒有保留初始源程序。無論何時援引FISH函數,其編好的pseudo指令執(zhí)行。編好的指令—不是翻譯好的源指令—的作用是使得程序更快的運行。然而,不像編程員那樣,FISH在任何時間都可以打印變量的名字和數值,用戶可以通過PFC中的SET命令修改數值。FISHprogramsaresimplyembeddedinanormalPFC2Ddatafile—linesfollowingthewordDEFINEareprocessedasaFISHfunction;thefunctionterminateswhenthewordENDisencount
7、ered.Functionsmayinvokeotherfunctions,whichmayinvokeothers,andsoon.Theorderinwhichfunctionsaredefineddoesnotmatter,aslongastheyarealldefinedbeforetheyareused(e.g.,invokedbyaPFC2Dcommand).SincethecompiledformofaFISHfunctionis