• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            聚星亭

            吾笨笨且懶散兮 急須改之而奮進
            posts - 74, comments - 166, trackbacks - 0, articles - 0
              C++博客 :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

            [翻譯]AngelScript 實用手冊之概述

            Posted on 2010-02-26 21:25 besterChen 閱讀(5005) 評論(2)  編輯 收藏 引用 所屬分類: 英語學習腳本研究

             

                   AngelScript 是當作一個引擎而構建的,當應用程序需要注冊函數、屬性(properties)和任意數據類型的時候,這個腳本可能會派上用場(原文: AngelScript is structured around an engine where the application should register the functions, properties, and even types, that the scripts will be able to use.)。本腳本庫依賴于應用程序,它會被編譯到應用程序的一個或多個模塊之中(原文: The scripts are then compiled into modules, where the application may have one or more modules, depending on the need of the application.)。應用程序也可以通過各式各樣的接口來使用configuration集合的每一個模塊(原文:The application can also expose a different interface to each module through the use of configuration groups)。當應用程序需要一個多類型的腳本時,例如圖形用戶界面,人工智能控制等等本腳本庫就顯得特別有用了(原文: This is especially useful when the application works with multiple types of scripts, e.g. GUI, AI control, etc.)。

             

                   腳本的函數、全局變量和類,每個模塊都有它自己的作用域范圍(原文: Each module has it's own scope of script functions, global variables, and classes)。即使各個模塊可能組建于同一個腳本源碼,它們之間通常也不會共享(原文: These are normally not shared between modules, even though multiple modules may be built from the same source scripts)。不過模塊可以通過綁定函數來相互配合相互影響(原文: However modules may interact with each others through function binding.)。

             

                   作為一個腳本,被編譯成 字節碼 AngelScript同樣也提供了一個虛擬機來作為執行這些字節碼的腳本環境,AngelScript同樣也提供了一個虛擬機來解析腳本的上下文,來將腳本編譯成字節碼并執行。(原文:As the scripts are compiled into bytecode AngelScript also provides a virtual machine, also known as a script context, for executing the bytecode)。盡管大多數應用程序可能僅需要一個腳本環境,但是應用程序可以在同一時間獲取許多腳本上下文(原文:The application can have any number of script context at the same time, though most applications will probably only need one.)。

             

                   這個環境支持可執行體的掛起和恢復,因此,這個應用程序可以很容易的執行就好像同時執行腳本和普通程序一樣(原文:The contexts support suspending the execution and then resuming it, so the application can easily implement features such as concurrent scripts and co-routines.)。腳本環境為了獲取運行時信息業提供了一個接口,這對調試腳本非常有用(原文:The script context also provides an interface for extracting run-time information, useful for debugging scripts.)。

             

                   AngelScript的腳本語言是在眾所周知的C + +語法之上增加像Java, C#D等更現代語言的語法(原文:The script language is based on the well known syntax of C++ and more modern languages such as Java, C#, and D.)。任何人只要了解一些別的語言,或者其他有著類似語法的腳本語言,像JavascriptActionScript,再用AngelScript會有一種一見如故的感覺(Anyone with some knowledge of those languages, or other script languages with similar syntax, such as Javascript and ActionScript, should feel right at home with AngelScript.)。

             

            跟許多的腳本語言相反,AngelScript是一個強類型的語言,它允許更快更穩定的執行代碼與宿主應用程序之間的交互會減少有類型值所需要的運行時間(原文:Contrary to most script languages, AngelScript is a strongly typed language, which permits faster execution of the code and smoother interaction with the host application as there will be less need for runtime evaluation of the true type of values.)。

                    

                   AngelScript的內存管理是基于一個用于檢測和釋放的循環引用對象來增加垃圾回收的引用計數(原文:The memory management in AngelScript is based on reference counting with an incremental garbage collector for detecting and freeing objects with circular references)。這就提供了一個可控環境,除非應用程序凍結垃圾回收機制來申請內存(原文:This provides for a controlled environment without application freezes as the garbage collector steps in to free up memory.)。

             

             

             

                                                                                                                        ---------  besterChen

                                                                                                                     譯于2010226星期五

            Feedback

            # re: AngelScript 實用手冊之概述  回復  更多評論   

            2010-02-27 00:14 by C/C++源碼論壇 (中國大學生軟件開發論壇)
            華為C++面試題2010年鄭州大學(2010-2-24全套面試題)

            轉載于 C/C++源碼論壇 (中國大學生軟件開發論壇) 我們專注C/C++

            http://www.cssdn.net/thread-8591-1-1.html">http://www.cssdn.net/thread-8591-1-1.html">http://www.cssdn.net/thread-8591-1-1.html

            華為C++面試題2010年鄭州大學(2010-2-24全套面試題)
            筆試地點 中原地區 鄭州大學
            1. 編寫strcat函數(5分)
            已知strcat函數的原型是char *strcat (char *strDest, const char *strSrc);
            其中strDest 是目的字符串,strSrc 是源字符串。
            (1)不調用C++/C 的字符串庫函數,請編寫函數 strcat
            (2)strcat能把strSrc 的內容連接到strDest,為什么還要char * 類型的返回值?
            2.使用線程是如何防止出現大的波峰(5)
            3.隊列和棧有什么區別?(9)
            (請至少說出三點)
            4、請找出下面代碼中的所以錯誤(5)
            說明:以下代碼是把一個字符串倒序,如“abcd”倒序后變為“dcba”

            1、#include"string.h"
            2、main()
            3、{
            4、 char*src="hello,world";
            5、 char* dest=NULL;
            6、 int len=strlen(src);
            7、 dest=(char*)malloc(len);
            8、 char* d=dest;
            9、 char* s=src[len];
            10、 while(len--!=0)
            11、 d++=s--;
            12、 printf("%s",dest);
            13、 return 0;
            14、}
            5.C++中為什么用模板類。(5)
            (請至少說出三點)
            ...
            ...
            ...

            嚴禁用于商業用途轉載 轉載請注明出去

            C/C++源碼論壇 (中國大學生軟件開發論壇) 我們專注C/C++
            http://www.cssdn.net
            回復 更多評論

            # re: [翻譯]AngelScript 實用手冊之概述  回復  更多評論   

            2010-02-27 11:59 by 凡客優惠卷
            很好1234566
            久久强奷乱码老熟女网站| 精品久久人人做人人爽综合| 国产精品99久久精品爆乳| 午夜精品久久久久久毛片| 综合久久一区二区三区 | 久久精品成人一区二区三区| 99久久无码一区人妻a黑| 日本欧美久久久久免费播放网 | 午夜精品久久久久久久无码| 品成人欧美大片久久国产欧美| 国产精品九九九久久九九| 久久精品国产亚洲av日韩| 狼狼综合久久久久综合网| 漂亮人妻被黑人久久精品| 亚洲国产精品无码久久久久久曰| 久久免费精品视频| 88久久精品无码一区二区毛片| 国产精品无码久久久久| 久久国产美女免费观看精品| 国产综合免费精品久久久| 久久天天躁狠狠躁夜夜2020老熟妇 | 欧洲人妻丰满av无码久久不卡| 久久久无码精品亚洲日韩蜜臀浪潮 | 中文字幕亚洲综合久久| 国产精品熟女福利久久AV| 无夜精品久久久久久| 久久久久久久波多野结衣高潮| 人妻少妇久久中文字幕一区二区| 久久91精品国产91久久小草| 国内精品久久久久国产盗摄| 久久经典免费视频| 久久精品国产99国产精品澳门 | 伊人久久大香线蕉精品不卡| 亚洲va久久久噜噜噜久久| 日本三级久久网| 久久精品免费一区二区| 久久青青草原国产精品免费 | 亚洲人成无码www久久久| 久久综合亚洲欧美成人| 青青热久久国产久精品 | 少妇人妻综合久久中文字幕|