• <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 - 19,comments - 20,trackbacks - 0
            /*
             * GridTest.h
             *
             *  Created on: 2009-2-27
             *      Author: Administrator
             
            */

            #ifndef GRIDTEST_H_
            #define GRIDTEST_H_

            class GridTest {
                
            static const int x=3,y=4;
            public:
                GridTest();

                
            virtual ~GridTest();
                typedef 
            int (GridTest:: *memberFuncType)(int x, int y);
                
            void display();
                
            int foreach(memberFuncType fn, int i, int j);
                
            int test1(int x, int y);
                
            int test2(int x, int y);
                
            int test3(int x, int y);
                
            int test4(int x, int y);
            };

            #endif /* GRIDTEST_H_ */



            /*
             * GridTest.cpp
             *
             *  Created on: 2009-2-27
             *      Author: Administrator
             
            */

            #include 
            "GridTest.h"
            #include 
            <iostream>
            using namespace std;

            GridTest::GridTest() {
                
            // TODO Auto-generated constructor stub

            }


            GridTest::
            ~GridTest() {
                
            // TODO Auto-generated destructor stub
            }

            int GridTest::foreach(memberFuncType fn, int x, int y){
                cout
            <<"GridTest::foreach(memberFuncType fn, int x, int y)執行了"<<endl;
                cout
            <<"fn(x,y)"<<(this->*fn)(x, y);
                
            return (this->*fn)(x, y);
            }

            int GridTest::test1(int x, int y){
                cout
            <<"GridTest::test1(int x, int y)執行了!"<<endl;
                
            return 0;
            }
            int GridTest::test2(int x, int y){
                cout
            <<"GridTest::test2(int x, int y)執行了!"<<endl;
                
            return 0;
            }
            int GridTest::test3(int x, int y){
                cout
            <<"GridTest::test3(int x, int y)執行了!"<<endl;
                
            return 0;
            }
            int GridTest::test4(int x, int y){
                cout
            <<"GridTest::test4(int x, int y)執行了!"<<endl;
                
            return 0;
            }
            void GridTest::display(){
                cout
            << this->foreach( this->test1, 4, 5); 
            //一直報錯:no matching function for call to `GridTest::foreach(<unknown type>, int, int)'
            }

            int main()
            {
                GridTest 
            *grid;
                grid
            = new GridTest();
                grid
            ->display();
                
            return 0;
            }

            這段代碼在VC6.0上就沒有問題,在Eclipse上編譯就報錯 no matching function for call to `GridTest::foreach(<unknown type>, int, int)'
            }
            posted @ 2009-03-09 17:14 華劍緣 閱讀(1593) | 評論 (5)編輯 收藏
            #include? " stdio.h "
            #include?
            " stdlib.h "
            typedef?
            struct
            {
            ?
            int ?number;
            ?
            int ?dicper;
            }
            ElemType;
            typedef?
            struct ?node
            {
            ?ElemType?data;
            ?
            struct ?node? * next;
            }
            Node, * LinkList;
            void ?Initiatte(LinkList? & L)
            {
            ?
            if ((L = (LinkList)malloc( sizeof (Node))) == NULL)exit( 1 );
            ?L
            -> next = L;
            }

            int ?Insert(LinkList? & L, int ?i,ElemType?x)
            {
            ?LinkList?q,p;
            ?p
            = L -> next;
            ?
            int ?j = 1 ;
            ?
            while (p != L? && ?j < i - 1 )
            ?
            {
            ??p
            = p -> next;
            ??j
            ++ ;
            ?}

            ?
            if (j != i - 1 ? && ?i != 1 )
            ?
            {
            ??printf(
            " 插入位置參數錯! " );
            ??
            return ? 0 ;
            ?}

            ?q
            = (LinkList)malloc( sizeof (Node));
            ?
            if ( ! q)exit( 1 );
            ?q
            -> data = x;
            ?q
            -> next = p -> next;
            ?p
            -> next = q;
            ?
            return ? 1 ;
            }

            int ?IsNotEmpty(LinkList?L)
            {
            ?
            if (L -> next == L) return ? 0 ;
            ?
            else ? return ? 1 ;
            }

            int ?Delete(LinkList? & p)
            {
            ?LinkList?q;
            ?q
            = p -> next;
            ?p
            -> next = p -> next -> next;
            ?free(q);
            ?
            return ? 1 ;
            }

            void ?output(LinkList? & L, int ?m)
            {
            ?LinkList?pre,q;
            ?pre
            = L;
            q
            = L -> next;
            ?
            while (IsNotEmpty(L) == 1 )
            ?
            {
            ??
            for ( int ?i = 1 ;i < m;i ++ )
            ??
            {
            ???pre;
            ???q
            = q -> next;
            ???
            if (q == L)
            ???
            {
            ????pre
            = q;
            ???q
            = q -> next;
            ???}

            ??}

            printf(
            " %d** " ,q -> data.number);
            ?m
            = q -> data.dicper;
            ?q
            = q -> next;
            ?
            if (q == L)q = q -> next;
            ?Delete(pre);
            ?}

            }

            int ?main()
            {
            ?
            int ?n;
            ?printf(
            " 請輸入人數的值:\n " );
            ?scanf(
            " %d " , & n);
            ?ElemType?
            * P;
            ?LinkList?L;
            ?Initiatte(L);
            ?
            int ?i,m;
            P?
            = ? new ?ElemType?[n];
            ?
            for (?i = 0 ;i < n;i ++ )
            ?
            {
            ?P[i].number
            = i + 1 ;
            ??printf(
            " 第%d個人輸入密碼 " ,i + 1 );
            ??printf(
            " \n " );
            ??scanf(
            " %d " , & P[i].dicper);
            ?}

            ??
            for (i = 1 ;i <= n;i ++ )
            ??Insert(L,i,P[i
            - 1 ]);
            ?printf(
            " 對m的數值進行初始化: " );
            ?scanf(
            " %d " , & m);
            ?printf(
            " 結果輸出: " );
            ?output(L,m);
            ?delete?[]?P;
            ?printf(
            " \n " );
            ?
            return ? 0 ;
            }


            12
            posted @ 2006-12-18 22:53 華劍緣 閱讀(251) | 評論 (0)編輯 收藏

            實驗一、Joseph問題

            ??? 問題描述 :約瑟夫(Joseph)問題的一種描述是:編號為12, 。。。,nn個人按順時針方向圍坐一圈,每人持有一個密碼(正整數)。一開始任選一個正整數作為報數上限值m,從第一個人開始按順時針方向自1開始順序報數,報到m時停止報數。報到m的人出列,將他的密碼作為新的m值,從他在順時針方向上的下一個人開始重新從1報數,如此下去,直到所有人全部出列為止。試設計一個程序求出出列順序。

            這是我們數據結構第一個實驗題目。大部分都用C語言寫。我用C++寫的,寫到一半編譯通過了,run的時候出了問題。還沒有寫完,只把用用到的類寫了出來。第一次這樣寫,不知道那里除了問題。

            代碼:

            ??1 #include? " iostream.h "
            ??2 // #include?"String.h"
            ??3
            ??4
            ??5
            ??6 class ?PersonList;
            ??7 class ?Joseph;
            ??8
            ??9 class ?Person {
            ?10 // friend?PersonList;
            ?11 private :
            ?12 ??? char ?num;
            ?13 ??? int ?value;
            ?14 ?? // ?Person?*next;
            ?15 public :
            ?16 ?Person? * next;
            ?17 ?Person();
            ?18 ????Person( char , int );
            ?19 ????Person(Person?? & A);
            ?20 }
            ;
            ?21
            ?22 Person::Person( char ?A, int ?Val)
            ?23 {
            ?24 ????num = A;
            ?25 ????value = Val;
            ?26
            ?27 }

            ?28 Person::Person(Person? & B)
            ?29 {
            ?30 ????num = B.num;
            ?31 ????value = B.value;
            ?32 ????next = B.next;
            ?33 }

            ?34 class ?PersonList {
            ?35 friend?Joseph;
            ?36 public :
            ?37 ????Person? * head, * tail;
            ?38 ? int ?sum;
            ?39 public :
            ?40 ????PersonList();
            ?41 ???? ~ PersonList();
            ?42 ???? void ?initialPL();
            ?43 ???? void ?insertPl(PersonList? & Pl,Person?x);
            ?44 ???? void ?DeleteBlPerson(Person?y);
            ?45 ???? bool ?NEmpty();
            ?46 }
            ;
            ?47
            ?48 PersonList::PersonList()
            ?49 {
            ?50 ?Person? * head = new ?Person;
            ?51 ?Person? * tail = head;
            ?52
            ?53 }

            ?54
            ?55 void ?PersonList::insertPl(PersonList? & PL,Person?x)
            ?56 {
            ?57 ????Person? * p = new ?Person(x);
            ?58 ????PL.tail -> next = p;
            ?59 ????PL.tail = p;
            ?60 ????PL.tail -> next = head;
            ?61
            ?62 }

            ?63 void ?PersonList::DeleteBlPerson(Person?y)
            ?64 {
            ?65 ????Person?p =* y.next;
            ?66 ?y.next = y.next -> next;
            ?67
            ?68 }

            ?69
            ?70
            ?71 class ?Joseph {
            ?72 private :
            ?73 ?PersonList?List;
            ?74
            ?75 public :
            ?76 ? char ? * JosephList;?? //用來存放輸出序列
            ?77 ?Joseph();
            ?78
            ?79
            ?80 }
            ;
            ?81
            ?82 Joseph::Joseph()
            ?83 {
            ?84 ?PersonList?P;
            ?85 ?P.initialPL();
            ?86 ?cout << " 人數?: " << endl;
            ?87 ?cin >> P.sum;
            ?88 ? for ( int ?i = P.sum;i > 0 ;i -- )
            ?89 ? {
            ?90 ??cout << " 代號 " << endl;
            ?91 ?? char ?a;
            ?92 ??cin >> a;
            ?93 ??cout << " " << endl;
            ?94 ?? int ?x;
            ?95 ??cin >> x;
            ?96 ??Person?Z(x,a);
            ?97 ??P.insertPl(P,Z);
            ?98 ?}

            ?99
            100
            101 }

            102
            103
            104
            105 int ?main()
            106 {
            107 ????Joseph?B;
            108 ????cout << " 輸入 " ;
            109
            110
            111 ???? return ? 0 ;
            112 }

            113



            ?

            posted @ 2006-12-12 22:59 華劍緣 閱讀(458) | 評論 (3)編輯 收藏
            ?this指針只能在一個類的成員函數中調用,它表示當前對象的地址。下面是一個例子:
            ????void Date::setMonth( int mn )
            ????{
            ???? month = mn; // 這三句是等價的
            ???? this->month = mn;
            ???? (*this).month = mn;
            ????}


            1. this只能在成員函數中使用。
            全局函數,靜態函數都不能使用this。
            實際上,成員函數默認第一個參數為T* const register this。
            如:
            class A{public: int func(int p){}};
            其中,func的原型在編譯器看來應該是: int func(A* const register this, int p);

            2. 由此可見,this在成員函數的開始前構造的,在成員的結束后清除。
            這個生命周期同任一個函數的參數是一樣的,沒有任何區別。
            當調用一個類的成員函數時,編譯器將類的指針作為函數的this參數傳遞進去。如:
            A a;
            a.func(10);
            此處,編譯器將會編譯成: A::func(&a, 10);
            嗯,看起來和靜態函數沒差別,對嗎?不過,區別還是有的。編譯器通常會對this指針做一些優化的,因此,this指針的傳遞效率比較高--如vc通常是通過ecx寄存器來傳遞this參數。

            3. 回答
            #1:this指針是什么時候創建的?
            this在成員函數的開始執行前構造的,在成員的執行結束后清除。
            #2:this指針存放在何處? 堆,棧,全局變量,還是其他?
            this指針會因編譯器不同,而放置的位置不同。可能是棧,也可能是寄存器,甚至全局變量。
            #3:this指針如何傳遞給類中函數的?綁定?還是在函數參數的首參數就是this指針.那么this指針又是如何找到類實例后函數的?
            this是通過函數參數的首參數來傳遞的。this指針是在調用之前生成的。類實例后的函數,沒有這個說法。類在實例化時,只分配類中的變量空間,并沒有為函數分配空間。自從類的函數定義完成后,它就在那兒,不會跑的。
            #4:this指針如何訪問類中變量的/?
            如果不是類,而是結構的話,那么,如何通過結構指針來訪問結構中的變量呢?如果你明白這一點的話,那就很好理解這個問題了。
            在C++中,類和結構是只有一個區別的:類的成員默認是private,而結構是public。
            this是類的指針,如果換成結構,那this就是結構的指針了。

            #5:我們只有獲得一個對象后,才能通過對象使用this指針,如果我們知道一個對象this指針的位置可以直接使用嗎?
            this指針只有在成員函數中才有定義。因此,你獲得一個對象后,也不能通過對象使用this指針。所以,我們也無法知道一個對象的this指針的位置(只有在成員函數里才有this指針的位置)。當然,在成員函數里,你是可以知道this指針的位置的(可以&this獲得),也可以直接使用的。
            #6:每個類編譯后,是否創建一個類中函數表保存函數指針,以便用來調用函數?
            普通的類函數(不論是成員函數,還是靜態函數),都不會創建一個函數表來保存函數指針的。只有虛函數才會被放到函數表中。
            但是,既使是虛函數,如果編譯器能明確知道調用的是哪個函數,編譯器就不會通過函數表中的指針來間接調用,而是會直接調用該函數。

            # 7:這些編譯器如何做到的?8:能否模擬實現?
            知道原理后,這兩個問題就很容易理解了。
            其實,模擬實現this的調用,在很多場合下,很多人都做過。
            例如,系統回調函數。系統回調函數有很多,如定時,線程啊什么的。

            舉一個線程的例子:
            class A{
            int n;
            public:
            static void run(void* pThis){
            A* this_ = (A*)pThis;
            this_->process();
            }
            void process(){}
            };

            main(){
            A a;
            _beginthread( A::run, 0, &a );
            }

            這里就是定義一個靜態函數來模擬成員函數。

            也有許多C語言寫的程序,模擬了類的實現。如freetype庫等等。
            其實,有用過C語言的人,大多都模擬過。只是當時沒有明確的概念罷了。
            如:
            typedef struct student{
            int age;
            int no;
            int scores;
            }Student;
            void initStudent(Student* pstudent);
            void addScore(Student* pstudent, int score);
            ...
            如果你把 pstudent改成this,那就一樣了。

            它相當于:
            class Student{
            public:
            int age; int no; int scores;
            void initStudent();
            void addScore(int score);
            }

            const常量可以有物理存放的空間,因此是可以取地址的


            ///this指針是在創建對象前創建.
            this指針放在棧上,在編譯時刻已經確定.
            并且當一個對象創建后,并且運行整個程序運行期間只有一個this指針.

            posted @ 2006-08-10 14:53 華劍緣 閱讀(309) | 評論 (0)編輯 收藏
                 摘要: /**/ /////////////////////////////////////// / //?????????????????????????????????????////????????????????????????????????????////數值分析??直接三角分...  閱讀全文
            posted @ 2006-05-30 21:22 華劍緣 閱讀(1897) | 評論 (0)編輯 收藏

            做題的意義

            ???????????????????????????????????????????????????????????????????????????????????????????????????????? ?By EmilMatthew 06/04/16

            ????????????????????? ?

            我可以有相當的理由,認為自己是一個喜愛學習的人,但是,我亦不得不承認,我的這份對學習的熱愛是有所偏失的,自然也就無法享受到學習的全然樂趣。尤其在做到一些稍難的問題的時候,長長是久攻不下,于是心生疑問,我這等熱情的投入學習,怎為何還無法去攻克難題,體會一些學科精妙之處。

            ?? ????????????? ??????? ?

            實際,這是一個謬誤,攻克難題,除了有 PASSION ,有知識上的積累,更為關鍵的,需要的是一種思維能力。而這種思維能力,對于理工科的學習而言,做題是個必不可少的環節。有 PASSION ,喜歡看書是我的現狀,這是好事情,但這絕不是說,有了這些就一定會有好的思維能力,雖然好的 PASSION 可以去激發一定的思維力,但好的思維力卻是必須要有訓練的這一環節的,否則,就會像一層窗戶紙,一捅就破,經不起有難度,有深度問題的考驗。

            ??? ????????????????????????????????????????????????????????????? ???????? ?

            ??? 自從進了大學后,實際上我對考試的熱情是逐漸下降的,對什么為考試而準備,忙的不可開焦之類的事甚為不齒。的確,到了大學還為考試而學習卻實沒什么意思,但是由厭惡考試而順帶著產生厭惡做題的情緒就是個很不好的結果了。其實我的學習熱情一直是高漲的,尤其是大一感受了程序設計的美妙之后,更是曾經一度為之廢寢忘食,再加上我對物理及數學那點或發自內心的或出于敬仰的喜愛,我對去解決一些有實際背景的問題還是充滿熱情的,每當能發現自己要能發現些或創造什么小成果的時候,更是令人心潮澎湃。但是,我對解題,也就是做傳統的書面上的試題卻一直提不起精神,盡管多數的題目自己是解得下來的,但是每當面對難題時,我仍舊是力不從心的。而且,我也發現,在自己看書的時候,很多最關鍵的證明,推導都相當的吃力。比如自動機的一些理論,較難的證明看幾眼就開始暈了;再如算法分析理論方面的證明,很多時候也都是望而卻步。究其原因,我想,最關鍵的一點,就是這其中的一個整體思路令人無法把握。而這思路,恰恰是思維過程的一個體現,光有知識的積累是遠遠不夠的,解題是思維能力訓練的一個至關重的環節。高中是也許由于過度的應試對解題心生厭倦了,但是到了大學里,如果你想學得深入的話對解題仍舊不能有絲毫的松懈。

            ??? ????????????????????????????????????????????????????? ???? ??? ? ??? ?

            ??? 讀書,更多的時候是側重吸收與理解,對于理工科類的書籍而言,讀書是否讀的透還與一個人的思維能力有著相當的關聯。在僅知道向量及線性代數的基礎上看張量的概念,有的人看的不知所云,有的人一知半解 ( 我就屬于這種 ) ,有的人一看就懂了;再如一些力學中的分析及演算,對于學的不扎實的人來說,可能把各個小步驟分解了看都懂是怎么回事,可以綜合到一起,就很難看出個所以然了。究其原因,在讀書能力基本一致的前提下,關鍵就是看你在看到這樣的一個概念闡述的時候,你在思維上能對它做出怎樣的反應。而這種思維上反應的高下,和讀書一樣,也是要有一個積累的過程的,而這種過程的積累,在我看來,很大一部分就是通過做題來提高的。

            ??? 思維的過程有歸納,推理,演繹,發散等許多方式,我們對某個問題的解決有意識和無意識中都用到了這些思維過程。無論是實際的工程問題,抑或是抽象出來的問題,如習題,思維能力起著至關重要的作用。當然,知識的積累在解決問題的過程中亦是舉足輕重的。用唯物論的觀點來看,二者的關系是相輔相承的。工程的,實際的問題相對要復雜和冗繁,但未必都很艱深,而習題中的抽象問題規模相對小,對問題的剖析能達到相當的深度。所以,任何一個有理性思考的人都可以看到,在學校把解決問題的基礎打好了,無論是以后做研究還是去投入到生產實踐中去,不說游刃有余,最起碼,在經過一定的適應后,是完全可以掌控的。而通過習題在思維層上的訓練,更是可以使你在理工科 ---- 這樣一個富于理性化分析,精巧構建,高度技巧化的領域中達到融會貫通,觸類旁通的作用。所以,以前我放棄或輕視做題的行為是何等的可笑!

            ????????????????????? ???

            ??? 之所以對解題提不起太多興趣,其中很大的一部分原因是由于多數情況下我們的解題處于一種被動的局面。也就是說,被老師“追著趕”,在這樣一種情緒下解題,一者難有好的心情,二者目的以完成任務為主,雖然能學到一些東西,但終究有些情非得已的意味。想有效而又快樂的解題,個人認為最好的法子就是主動出擊,自己去找題來做,不必多找,找一兩本較好出版社或在某一方面特別有實力的學校出的書是肯定不會錯的。然后,就是自己的解題,回顧與體會了。至于解題的多少只能是因人而異了,這和你個人的實際情況有很大關聯,但有一點,就是解題一定要投入,一定要重視自己做的這些題的從哪個角度去考查思維力以及對知識的運用、掌握,否則,妄想以多做題來達到思維飛躍的想法是徒勞的。個人認為,這學習的主動性一旦被調動起來之后,你馬上會感受到解題也竟然和看書一樣,有著許多收獲的喜悅與驚奇。而從解題中可以直接得到的最為重要的好處在于:一來你對某門課程本身的體系和知識結構加深了理解和掌握;二來你的思維能力體系又得到了再一次的加強,遇到新問題的時候(哪怕和原來的領域不相關),你的活躍的思路也必定會給你帶來解決問題的更多、更好的啟示。

            ?

            ??? 所以,作為一個理工科學生的你,無論是以后想做科研,還是想盡快投入生產實踐,思維能力是極其重要的,而做題,則是其中的一條必由之路。當你真正投入時,你會發現,做題原來也可以這般的享受。

            ????????????????????????????

            posted @ 2006-05-15 23:01 華劍緣 閱讀(241) | 評論 (0)編輯 收藏
            1.某公司采用公用電話傳遞10組數據,每組數據必須由四位整數組成,數據在傳遞過程中是加密的,加密規則如下:每組數據中的每位數字都加上5,然后用和除以10的余數代替該數字,再將第一位和第四位交換,第二位和第三位交換。編程輸出加密前后的數據。
            posted @ 2006-04-21 23:26 華劍緣 閱讀(228) | 評論 (0)編輯 收藏
            2005圖靈獎獲得者產生
            ????? 3月1日,ACM(美國計算機學會)決定將2005年圖靈獎頒發給Peter Naur,以表彰他在設計Algol 60語言上的貢獻。由于其定義的清晰性,Algol 60成為了許多現代程序設計語言的原型。在語法描述中廣泛使用的BNF范式,其中的“N”便是來自Peter Naur的名字。圖靈獎被稱為“計算科學界的諾貝爾獎”,它創立于1960年,現在的獎金10萬美元,由Intel公司贊助。??
            ??????詳文如下:
            ??????
            SOFTWARE PIONEER PETER NAUR WINS ACM'S TURING AWARD

            Dane's Creative Genius Revolutionized Computer Language Design

            New York, March 01, 2006??--??The Association for Computing Machinery (ACM) has named Peter Naur the winner of the 2005 A.M. Turing Award. The award is for Naur's pioneering work on defining the Algol 60 programming language. Algol 60 is the model for many later programming languages, including those that are indispensable software engineering tools today. The Turing Award, considered the "Nobel Prize of Computing" was first awarded in 1966, and is named for British mathematician Alan M. Turing. It carries a $100,000 prize, with financial support provided by Intel Corporation.

            Dr. Naur was editor in 1960 of the hugely influential "Report on the Algorithmic Language Algol 60." He is recognized for the report's elegance, uniformity and coherence, and credited as an important contributor to the language's power and simplicity. The report made pioneering use of what later became known as Backus-Naur Form (BNF) to define the syntax of programs. BNF is now the standard way to define a computer language. Naur is also cited for his contribution to compiler design and to the art and practice of computer programming.

            "Dr. Naur's ALGOL 60 embodied the notion of elegant simplicity for algorithmic expression," said Justin Rattner, Intel senior fellow and Chief Technology Officer. "Over the years, programming languages have become bloated with features and functions that have made them more difficult to learn and less effective. This award should encourage future language designers who are addressing today's biggest programming challenges, such as general-purpose, multi-threaded computation, to achieve that same level of elegance and simplicity that was the hallmark of ALGOL 60."

            Contributions Signal Birth of Computing Science

            In 2002, former Turing Award winner Edsger Dijkstra characterized the development of Algol 60 as "an absolute miracle" that signaled the birth of what he called "computing science" because it showed the first ways in which automatic computing could and should become a topic of academic concern. The development of Algol 60 was the result of an exceptionally talented group of people, including several who were later named Turing Award winners.

            Dr. Naur's contribution to Algol 60, was seminal. John Backus, another former Turing Award winner, acknowledged Naur as the driving intellectual force behind the definition of Algol 60. He commented that Naur's editing of the Algol report and his comprehensive preparation for the January 1960 meeting in which Algol was presented "was the stuff that really made Algol 60 the language that it is, and it wouldn't have even come about, had he not done that."

            Before publication of the Algol 60 Report, computer languages were informally defined by their prose manuals and the compiler code itself. The report, with its use of BNF to define the syntax, and carefully chosen prose to define the semantics, was concise, powerful, and unambiguous.

            The 17-page Algol 60 Report presented the complete definition of an elegant, transparent language designed for communication among humans as well as with computers. It was deliberately independent of the properties of any particular computer. The new language was a major challenge to compiler writers. Dr. Naur went on to co-author the GIER Algol Compiler (for the transistorized electronic computer developed in Denmark known as GIER), one of the first compilers to deal fully and correctly with the language's powerful procedure mechanism.

            "Dr. Naur's contribution was a watershed in the computing field, and transformed the way we define programming languages," said James Gray of Microsoft Research, and Chair of the 2005 Turing Committee. "Many of the programming constructs we take for granted today were introduced in the Algol Report, which introduced a concise block-structured language that improved the way we express algorithms."

            Dr. Naur was instrumental in establishing software engineering as a discipline. He made pioneering contributions to methodologies for writing correct programs through his work on assertions that enable programmers to state their assumptions, and on structured programming. "His work, though formal and precise, displays an exceptional understanding of the limits and uses of formalism and precision," said Gray. Through these activities, and his development of an influential computer science curriculum, Dr. Naur contributed fundamental components of today's computing knowledge and skills.

            Early Experience in Practical Calculations and Applications

            Dr. Naur began his scientific pursuits as an astronomer, where he was involved in computations of the orbits of comets and minor planets. He obtained a magister of science degree (the equivalent of a master's degree) from Copenhagen University in 1949. He later returned there to earn a doctorate in astronomy in 1957. During the 1950-51 academic year, Dr. Naur studied astronomy at King's College in Cambridge, U.K., and came to the U.S. to further his work in the field. This work involved using early computers (starting with EDSAC, the world's first practical stored program electronic computer) for his astronomical calculations. In 1953, he returned to Denmark and served as a scientific assistant at Copenhagen Observatory.

            In 1959, he joined the staff of the compiler design group at Regnecentralen, the first Danish computer company. There he organized the Algol Bulletin and was editor of the 13-person international Algol 60 team's report that defined Algol 60. He became a professor at the Copenhagen University Institute of Datalogy in 1969, retiring in 1998.

            Dr. Naur was awarded the G. A. Hagemann Gold Medal from the Danish Technical University in 1963, the Jens Rosenkjaer Prize from the Danish Radio in 1966, and the Computer Pioneer Award from the Institute of Electrical and Electronics Engineers in 1986.
            ACM will present the Turing Award at the annual ACM Awards Banquet on May 20, 2006, at the Westin St. Francis Hotel in San Francisco, CA.

            About the A.M. Turing Award

            The A.M. Turing Award was named for Alan M. Turing, the British mathematician who articulated the mathematical foundation and limits of computing, and who was a key contributor to the Allied cryptanalysis of the German Enigma cipher during World War II. Since its inception, the Turing Award has honored the computer scientists and engineers who created the systems and underlying theoretical foundations that have propelled the information technology industry. For additional information, please see the A. M. Turing Awards site.

            About ACM

            ACM, the Association for Computing Machinery (http://www.acm.org), is an educational and scientific society uniting the world's computing educators, researchers and professionals to inspire dialogue, share resources and address the field's challenges. ACM strengthens the profession's collective voice through strong leadership, promotion of the highest standards, and recognition of technical excellence. ACM supports the professional growth of its members by providing opportunities for life-long learning, career development, and professional networking.
            posted @ 2006-04-15 16:52 華劍緣 閱讀(868) | 評論 (0)編輯 收藏
                 摘要: [求助]?關于拷貝構造函數,對象傳遞!!#include? < iostream.h > class ?Matrix { private :???? int ?...  閱讀全文
            posted @ 2006-04-11 13:22 華劍緣 閱讀(725) | 評論 (6)編輯 收藏


            幻方:

            #include? " iostream.h "

            int ?main()
            {
            ????????
            int ?N,i,j,count;
            ????????cout
            << " Please?enter?N: " ;
            ????????cin
            >> N;
            ????????
            int ? ** arr = new ? int * ?[N];
            ????????
            for (i = 0 ;i < N;i ++ )
            ????????????????arr[i]
            = new ? int [N];
            ????????
            for (i = 0 ;i < N;i ++ )
            ????????????????
            for (j = 0 ;j < N;j ++ )
            ????????????????????????arr[i][j]
            = 0 ;
            ????????arr[
            0 ][(N + 1 ) / 2 - 1 ] = 1 ;
            ????????
            for (count = 1 ,i = 0 ,j = (N + 1 ) / 2 - 1 ;count < N * N;count ++ )
            ????????
            {
            ????????????????i
            -- ;
            ????????????????j
            -- ;
            ????????????????
            if (i ==- 1 )
            ????????????????????????i
            = N - 1 ;
            ????????????????
            if (j ==- 1 )
            ????????????????????????j
            = N - 1 ;
            ????????????????
            if (arr[i][j] == 0 )
            ????????????????????????arr[i][j]
            = count + 1 ;
            ????????????????
            else ? if (arr[i][j] > 0 )
            ????????????????
            {
            ????????????????????????i
            = i + 2 ;
            ????????????????????????j
            = j + 1 ;
            ????????????????????????
            if (j == N)
            ????????????????????????????????j
            = 0 ;
            ????????????????????????
            if (i == N)
            ????????????????????????????????i
            = 0 ;
            ????????????????????????
            else ? if (i == N + 1 )
            ????????????????????????????????i
            = 1 ;
            ????????????????????????arr[i][j]
            = count + 1 ;
            ????????????????}

            ????????}

            ????????
            for (i = 0 ;i < N;i ++ )
            ????????
            {
            ????????????????
            for (j = 0 ;j < N;j ++ )
            ????????????????
            {
            ????????????????????????cout
            << arr[i][j] << " ? " ;
            ????????????????}

            ????????????????cout
            << " \n " ;
            ????????}

            ?????????????????????
            for (i = 0 ;i < N;i ++ )
            ????????????????delete?[]?arr[i];
            ????????delete?[]?arr;
            ????????
            return ? 1 ;
            }
            posted @ 2006-04-09 22:58 華劍緣 閱讀(492) | 評論 (3)編輯 收藏
            僅列出標題  下一頁
            久久露脸国产精品| 91秦先生久久久久久久| 亚洲色欲久久久综合网东京热| 麻豆成人久久精品二区三区免费| 久久亚洲欧美日本精品| 久久久久97国产精华液好用吗| 久久久久久久久久久| 婷婷久久综合九色综合98| 热久久视久久精品18| 久久久综合九色合综国产| 久久久精品久久久久影院| 亚洲国产精品久久久久| 伊人色综合久久天天人手人婷 | 久久久久亚洲AV无码专区体验| 狠狠综合久久综合中文88| 久久亚洲AV成人无码电影| 欧美亚洲日本久久精品| 久久亚洲国产精品一区二区| 久久精品无码一区二区WWW| 久久久WWW成人免费毛片| 久久福利青草精品资源站免费 | 国产精品一久久香蕉产线看| 久久久午夜精品| 久久久久亚洲AV成人网人人网站| 国产一区二区三区久久精品| 亚洲欧洲日产国码无码久久99| 亚洲а∨天堂久久精品9966| 激情久久久久久久久久| 久久综合中文字幕| 999久久久无码国产精品| 人妻无码αv中文字幕久久琪琪布 人妻无码久久一区二区三区免费 人妻无码中文久久久久专区 | 久久精品人成免费| 波多野结衣AV无码久久一区| 国产精品久久久久久久久软件| 久久99精品久久久久久秒播| 国产精品免费久久久久影院| 久久不射电影网| 狠狠久久综合| 亚洲国产日韩欧美综合久久| 亚洲国产成人精品女人久久久| 久久久久亚洲?V成人无码|