【正文】
一步的提高,對(duì)數(shù)據(jù)結(jié)構(gòu)的課本知識(shí)也得到了進(jìn)一步的鞏固。 參考文獻(xiàn)[1](原書(shū)第4版) .機(jī)械工業(yè)出版社, 2002 .[2] 徐寶文,李志, 程序設(shè)計(jì)語(yǔ)言(第二版). 機(jī)械工業(yè)出版社,2004.[3] Niklaus Wirth. 算法+數(shù)據(jù)結(jié)構(gòu)=, 2001.[4],2002.[5] (C++版、JAVA版). 電子工業(yè)出版社,1999.[6] ,2002.[7]. 電子工業(yè)出版,2001.[8] . 清華大學(xué)出版社,2007.[9],2012.[10],2009.致 謝通過(guò)兩周時(shí)間的的努力,課程設(shè)計(jì)終于完成了,這意味著這一階段艱苦的熱烈的付出即將告一段落。在這里再次感謝一起搭檔的同學(xué),對(duì)我們精心指導(dǎo)的老師,以及在我學(xué)習(xí)過(guò)程中給我極大關(guān)心和支持的各位老師以及同學(xué)和朋友。在程序調(diào)試過(guò)程中,各種問(wèn)題的出現(xiàn)讓我困難重重,但也讓我掌握了很多新的編程技巧,積累了一些編程經(jīng)驗(yàn)。通過(guò)這次課設(shè),了解簡(jiǎn)單行編輯程序應(yīng)用的廣泛性。 ,儲(chǔ)存文本文檔于計(jì)算機(jī)D盤,將其用于程序執(zhí)行。提示用戶輸入任意鍵進(jìn)行其他功能。}} 測(cè)試數(shù)據(jù):任意的TXT文件,只要每行不超過(guò)80個(gè)字符。 return 0。 for(i=1,p=head。 printf(\t **********************************************************\n)。 printf(\t ** 行插入格式: i行號(hào)回車文本回車 **\n)。}Status SaveFile(textp head,FILE *out) /*存儲(chǔ)活區(qū)的函數(shù)*/{ textp p。}Status LoadFile(textp head,FILE *fp) /*從文件讀內(nèi)容到活區(qū)*/ {textp p。 /*找到第一個(gè)flat=1的點(diǎn)*/ pnext=p1next。 fflush(stdin)。輸入文本內(nèi)容并連入鏈表。 for(i=0。min,amp。 Status LoadFile(textp head,FILE *fp)。int del(textp head)。S,char amp。功能:從輸入文件讀取內(nèi)容到活區(qū)。head)。Status Createlist(textp amp。逐頁(yè)地(每頁(yè)20行)顯示活區(qū)內(nèi)容,每顯示一頁(yè)之后由用戶決定是否繼續(xù)顯示以后各頁(yè)(如果存在)。試按這種方法實(shí)現(xiàn)一個(gè)簡(jiǎn)單的行編輯程序,設(shè)文件每行不超過(guò)320個(gè)字符,很少超過(guò)80個(gè)字符。在程序設(shè)計(jì)中采用了字符串的方法實(shí)現(xiàn)對(duì)簡(jiǎn)單的行編輯器?,F(xiàn)在常見(jiàn)的編輯器,都是通過(guò)移動(dòng)光標(biāo),來(lái)選取要編輯的文本段落,與此不同的是,行編輯只能對(duì)“當(dāng)前行”進(jìn)行編輯。 text。現(xiàn)利用字符串來(lái)定義,設(shè)計(jì)并實(shí)現(xiàn)了一個(gè)簡(jiǎn)單行編輯程序,具備行編輯器的行插入,行刪除等基本功能。摘 要文本編輯程序是利用計(jì)算機(jī)進(jìn)行文字加工的基本軟件工具,實(shí)現(xiàn)對(duì)文本文件的插入、刪除等修改操作。一般而言,用戶無(wú)法直接輸入文本,而只能在文本終端上通過(guò)簡(jiǎn)要的命令,對(duì)已有的文檔進(jìn)行添加或編寫(xiě)。Text editor is the basic software tools, the use of puters for word processing, to achieve the insertion of text files, delete modify operation. Restrictions on these operating units to conduct the editor called line editing process. Line editor can be engaged in the input and output of the most simple. The input, editing, document display can not synchronously. Edit text files can be quite large, all read into memory is neither economic nor can always achieve. One solution is to edit line by line, any moment only put a line to edit the file in memory, known as the living area. Allow the discovery of the error input errors and corrected in time. In general, the user cannot enter text directly, but only through the brief mands in the text terminal, the document may be added or write. We use