<?xml version="1.0" encoding="utf-8"?>



<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">

<channel>

<language>zh-cn</language>
<copyright>dapenti.com</copyright>
<generator>www.dapenti.com</generator>
<webMaster>dapenti2006@gmail.com</webMaster>

<title>喷嚏网----阅读、发现和分享：8小时外的健康生活！ 之 [青少年学电脑编程(8-17岁)]</title><link>http://www.dapenti.com/blog/blog.asp?name=KPLer</link><description>喷嚏网--[青少年学电脑编程(8-17岁)]</description><item>
<title><![CDATA[程序员怎样学数学：半路出家也能让编程是小菜一碟]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=8370</link>
<author>KPLer</author>
<pubDate>Tue, 30 Oct 2007 10:08:00 +0800</pubDate>
<description><![CDATA[
<P>I've been working for the past 15 months on repairing my rusty math skills, ever since I read a biography of Johnny von Neumann. I've read a huge stack of math books, and I have an even bigger stack of unread math books. And it's starting to come together. <BR><BR>自从我读了Johnny von Neumann的传记,我已经为弥补我糟糕的数学技能花了15个月了.读了大量的数学书籍,不过呢,似乎我还有更多没有读.当然我会接着做的. <BR><BR>Let me tell you about it. <BR><BR>现在我就来告诉你这些. <BR><BR>Conventional Wisdom Doesn't Add Up <BR><BR>这并不包括传统的智慧 <BR><BR>First: programmers don't think they need to know math. I hear that so often; I hardly know anyone who disagrees. Even programmers who were math majors tell me they don't really use math all that much! They say it's better to know about design patterns, object-oriented methodologies, software tools, interface design, stuff like that. <BR><BR>首先:<NOBR>程序员</NOBR>不认为他们需要了解数学.我常常听到这样的话;我不知道还有会不同意这个的.甚至于以前是主修数学的程序员也告诉我他们真的不是常常使用到数学!他们说 更重要的是要去了解<NOBR>设计模式</NOBR>,面向对象原理,软件工具,界面设计,以及一些类似的东西. <BR><BR>And you know what? They're absolutely right. You can be a good, solid, professional programmer without knowing much math. <BR><BR>你了解吗?他们完全正确.你不需要了解很多数学你就能做个很棒,很专业的程序员. <BR><BR>But hey, you don't really need to know how to program, either. Let's face it: there are a lot of professional programmers out there who realize they're not very good at it, and they still find ways to contribute. <BR><BR>但是呢,同时你也不是真的需要知道如何来<NOBR>编程</NOBR>.我们要面对的是:有很多专业的程序员,他们认识到他们不是非常擅长数学,但他们还是寻找方法去提升. <BR><BR>If you're suddenly feeling out of your depth, and everyone appears to be running circles around you, what are your options? Well, you might discover you're good at project management, or people management, or UI design, or technical writing, or system administration, any number of other important things that "programmers" aren't necessarily any good at. You'll start filling those niches (because there's always more work to do), and as soon as you find something you're good at, you'll probably migrate towards doing it full-time. <BR><BR>如果你突然觉得自己好烂,周围的人都远远的超过你,你会怎么想呢?好,你可能会发现 自己善于项目管理,或者人事管理,或者界面设计,或技术写作,或者系统管理,还有许多 其他程序员不必去精通的.你会开始堆积那些想法(因为工作永远干不完),当你发现一些你能掌握的东西时,你很可能会转移去全职的做这个工作. <BR><BR>In fact, I don't think you need to know anything, as long as you can stay alive somehow. <BR><BR>实际上,我认为有些东西你不需要了解,当目前你还能够赖以生存. <BR><BR>So they're right: you don't need to know math, and you can get by for your entire life just fine without it. <BR><BR>所以他们是对的:你不需要了解数学,并且没有她你也能过的很好. <BR><BR>But a few things I've learned recently might surprise you: <BR><BR>但是最近我学到一些东西可能会让你也感到惊喜:<BR><BR>Math is a lot easier to pick up after you know how to program. In fact, if you're a halfway decent programmer, you'll find it's almost a snap. <BR><BR>在你知道如何编程之后,数学更容易学会.实际上,如果你先学数学,然后半路出家做程序员的话,你会发现编程简直就是小菜一碟.<BR><BR>They teach math all wrong in school. Way, WAY wrong. If you teach yourself math the right way, you'll learn faster, remember it longer, and it'll be much more valuable to you as a programmer. <BR><BR>学校里教数学的方式都错了.仅仅是教学的方法错了,不是教数学本身错.如果你以正确 的方式学习数学的话,你会学的更快,记住这会更长,但对你作为一个程序员来说也更有价值.<BR><BR>Knowing even a little of the right kinds of math can enable you do write some pretty interesting programs that would otherwise be too hard. In other words, math is something you can pick up a little at a time, whenever you have free time. <BR><BR>哪怕了解一点点相关的数学知识就能让你写出可爱有趣的程序,否则会有些小难度.换 句话讲,数学是可以慢慢学的,只要你有时间.<BR><BR>Nobody knows all of math, not even the best mathematicians. The field is constantly expanding, as people invent new formalisms to solve their own problems. And with any given math problem, just like in programming, there's more than one way to do it. You can pick the one you like best. <BR><BR>没人能了解所有的数学,就是最棒的数学家也不是.数学领域正不断的扩展,当人们发明 新的形式去解决自己的问题时.一些给出的数学问题,也正如编程,不止一种方法可以去 解决他.你可以挑个你最喜欢的.<BR><BR>Math is... ummm, please don't tell anyone I said this; I'll never get invited to another party as long as I live. But math, well... I'd better whisper this, so listen up: (it's actually kinda fun.) <BR><BR>数学是......嗯,请别告诉别人我说过这个哈;当然我也不指望谁能邀请我参加这样的 派对,当我还活着的时候.但是,数学其实就是......我还是小声的说吧,听好了:(她其 实就是一种乐趣啦!) <BR><BR><BR><BR>The Math You Learned (And Forgot) <BR><BR>你学到的数学(和你忘了的) <BR><BR>Here's the math I learned in school, as far as I can remember: <BR><BR>这儿是我能记得在学校学到的数学: <BR><BR>Grade School: Numbers, Counting, Arithmetic, Pre-Algebra ("story problems") <BR><BR>初中:数,数数,算术知识,初级代数("问题故事") <BR><BR>High School: Algebra, Geometry, Advanced Algebra, Trigonometry, Pre-Calculus (conics and limits) <BR><BR>高中:代数,几何,高等代数,三角学,? (圆锥和极限) <BR><BR>College: Differential and Integral Calculus, Differential Equations, Linear Algebra, Probability and Statistics, Discrete Math <BR><BR>大学:微积分,微分公式,线性代数,概率和统计,离散数学 <BR><BR>How'd they come up with that particular list for high school, anyway? It's more or less the same courses in most U.S. high schools. I think it's very similar in other countries, too, except that their students have finished the list by the time they're nine years old. (Americans really kick butt at monster-truck competitions, though, so it's not a total loss.) <BR><BR>上面那个关于<NOBR>高中数学</NOBR>课程单子上所列的,怎么来着?美国高中几乎都是这样的课程设置.我认为其他国家也会很相似的,除了那些在9岁之前就掌握了这些课程的学生.(美国人同时却在热衷于玩魔鬼卡车竞赛,虽然如此,整个来说也算不上什么大损失.) <BR><BR>Algebra? Sure. No question. You need that. And a basic understanding of Cartesian geometry, too. Those are useful, and you can learn everything you need to know in a few months, give or take. But the rest of them? I think an introduction to the basics might be useful, but spending a whole semester or year on them seems ridiculous. <BR><BR>代数?是的.没问题.你需要代数.和一些理解解析几何的知识.那些很有用,并且在以后 几个月里,你能学到一切你想要的,十拿九稳的.剩下的呢?我认为一个基本的介绍可能 会有用,但是在这上面花整个学期或一年就显得很荒谬了. <BR><BR>I'm guessing the list was designed to prepare students for science and engineering professions. The math courses they teach in and high school don't help ready you for a career in programming, and the simple fact is that the number of programming jobs is rapidly outpacing the demand for all other engineering roles. <BR><BR>我现在意识到那个书单列表原是设计来准备给那些以后要当科学家和<NOBR>工程师</NOBR>的学生的.他们在高中里所教的数学课程并不是为你的编程生涯做准备的,简单的事实是多数的编程工作相比其他的工程师角色更加要求快速. <BR><BR>And even if you're planning on being a scientist or an engineer, I've found it's much easier to learn and appreciate geometry and trig after you understand what exactly math is — where it came from, where it's going, what it's for. No need to dive right into memorizing geometric proofs and trigonometric identities. But that's exactly what high schools have you do. <BR><BR>甚至于你打算当一名科学家或者一名工程师,我会发现这更加容易去学习和欣赏几何学和三角在你理解了什么是数学之后-- 数学它如何而来,如何而去,为何而生.不必去专研记住几何上的证明和三角恒等式.但是那确实是高中学校要求你必须去做的. <BR><BR>So the list's no good anymore. Schools are teaching us the wrong math, and they're teaching it the wrong way. It's no wonder programmers think they don't need any math: most of the math we learned isn't helping us. <BR><BR>所以这样的书单列表不再有什么用了.学校教了我们不是最合适的数学,并且方式也不对.不奇怪程序员认为他们不再需要数学:我们学的大部分数学知识对我们的工作没什么大的帮助. <BR><BR><BR><BR>The Math They Didn't Teach You <BR><BR>他们没有教到你的那部分数学 <BR><BR>The math computer scientists use regularly, in real life, has very little overlap with the list above. For one thing, most of the math you learn in grade school and high school is continuous: that is, math on the real numbers. For computer scientists, 95% or more of the interesting math is discrete: i.e., math on the integers. <BR><BR>在真实的生活中,计算机科学家有规则的使用数学,对于上面单子里列的有点小小超过. 举个例子,你在中学里学的大部分数学是连续性的:也就是说,数学是真实的数字.而对于计算机科学家来说,他们所感兴趣的部分是占95%也许更多的离散性的:比如,关于整数的数学. <BR><BR>I'm going to talk in a future blog about some key differences between computer science, software engineering, programming, hacking, and other oft-confused disciplines. I got the basic framework for these (upcoming) insights in no small part from Richard Gabriel's Patterns Of Software, so if you absolutely can't wait, go read that. It's a good book. <BR><BR>我打算在我以后blog中再谈一些在计算机科学,软件工程,编程,hacking,和其他常常迷惑的管理的之间的关键差异.我已经从Richard Gabriel的软件的模式这本书中洞察到一个无关细节的基本框架.如果你明显的等不下去的话,去读吧.是本不错的书. <BR><BR>For now, though, don't let the term "computer scientist" worry you. It sounds intimidating, but math isn't the exclusive purview of computer scientists; you can learn it all by yourself as a closet hacker, and be just as good (or better) at it than they are. Your background as a programmer will help keep you focused on the practical side of things. <BR><BR>到现在为止,不要让"计算机科学家"这个词困扰到你.它听上去很可怕,其实数学不是计算机科学家所独有的领域,你也能作为一个黑客自学它,并且能做的和他们一样棒.你作为一个程序的背景将会帮助你保持只关注那些有实践性的部分. <BR><BR>The math we use for modeling computational problems is, by and large, math on discrete integers. This is a generalization. If you're with me on today's blog, you'll be studying a little more math from now on than you were planning to before today, and you'll discover places where the generalization isn't true. But by then, a short time from now, you'll be confident enough to ignore all this and teach yourself math the way you want to learn it. <BR><BR>数学,我们用来建立计算模型的,大体上是离散的整数.这是普遍化的做法.如果正好今天你在看这篇博客,从现在起你正了解到更多的数学,并且你会认识到那样的普遍化是不对的.更多的,你将有信心认为可以忽略所有这些,并以你想要的方式自学. <BR><BR>For programmers, the most useful branch of discrete math is probability theory. It's the first thing they should teach you after arithmetic, in grade school. What's probability theory, you ask? Why, it's counting. How many ways are there to make a Full House in poker? Or a Royal Flush? Whenever you think of a question that starts with "how many ways..." or "what are the odds...", it's a probability question. And as it happens (what are the odds?), it all just turns out to be "simple" counting. It starts with flipping a coin and goes from there. It's definitely the first thing they should teach you in grade school after you learn Basic Calculator Usage. <BR><BR>对程序员来说,最有效的离散数学的分支是概率理论.这是你在学校学完基本算术后的紧接着的课.你会问,什么是概率理论呢?你就数啊,看有多少次出现满堂彩?或者有多次是同花顺. 不管你思考什么问题如果是以"多少种途径..."或"有多大几率的...",那就是离散问题.当他发生时,都 转化成"简单"的计数.抛个硬币看看...? 毫无疑问在他们教你基本的计算用法后他们会教你概率理论. <BR><BR>I still have my discrete math textbook from college. It's a bit heavyweight for a third-grader (maybe), but it does cover a lot of the math we use in "everyday" computer science and computer engineering. <BR><BR>我还保存着大学里的离散数学课本.可能他只占了三分之一的课程,但是它却涵盖了我们几乎每天计算机编程工作大部分所使用到的数学. <BR><BR>Oddly enough, my professor didn't tell me what it was for. Or I didn't hear. Or something. So I didn't pay very close attention: just enough to pass the course and forget this hateful topic forever, because I didn't think it had anything to do with programming. That happened in quite a few of my comp sci courses in college, maybe as many as 25% of them. Poor me! I had to figure out what was important on my own, later, the hard way. <BR><BR>也真是够奇怪的,我的教授从没告诉我数学是用来干吗的.或者我也从来没有听说过.种种原因吧.所以我也从没有给以足够的注意:只是考试及格然后把他们都忘光,因为我不认为她还和编程有啥关系.事情变化是我在大学学完一些计算机科学的课程之后,也许是25%的课程.可怜的人!我必须弄明白什么对于自己来说是最重要的,然后再是向深度发展. <BR><BR>I think it would be nice if every math course spent a full week just introducing you to the subject, in the most fun way possible, so you know why the heck you're learning it. Heck, that's probably true for every course. <BR><BR>我想,如果每门数学课都花上整整一周的时间,而只是介绍让你如何入门的话,那将非常不错,这是最有意思的一种假设,那么你知道了你正学习的对象是哪种怪物了.怪物,大概对每一门课都合适. <BR><BR>Aside from probability and discrete math, there are a few other branches of mathematics that are potentially quite useful to programmers, and they usually don't teach them in school, unless you're a math minor. This list includes: <BR><BR>除了概率和离散数学外,还有不少其他的数学分支,可能对程序员相当的有用,学校通常不会教你的,除非你的辅修科目是数学.这些数目列表包括: <BR>Statistics, some of which is covered in my discrete math book, but it's really a discipline of its own. A pretty important one, too, but hopefully it needs no introduction. <BR><BR>统计学,其中一些包括在我的离散数学课里,她的某些训练只限于她自身.自然也是相当重要的,但想学的话不需要什么特别的入门. <BR>Algebra and Linear Algebra (i.e., matrices). They should teach Linear Algebra immediately after algebra. It's pretty easy, and it's amazingly useful in all sorts of domains, including machine learning. <BR><BR>代数和线性代数(比如,矩阵).他们会在教完代数后立即教线性代数.这也简单,这但相当多的领域非常有用,包括机器学习. <BR>Mathematical Logic. I have a really cool totally unreadable book on the subject by Stephen Kleene, the inventor of the Kleene closure and, as far as I know, Kleenex. Don't read that one. I swear I've tried 20 times, and never made it past chapter 2. If anyone has a recommendation for a better introduction to this field, please post a comment. It's obviously important stuff, though. <BR><BR>数理逻辑.我有相当完整的关于这么学科的书没有读,是Stephen Kleene写的,Kleene closure 的发明者,我所知道的还有就是Kleenex.这个就不要读了.我发誓我已经尝试了不下20次,却从没有读完第二章.如果那位牛掰有什么更好的入门建议的话可以给我推荐,给个回复.虽然,这明显是非常重要的一部分.<BR><BR>Information Theory and Kolmogorov Complexity. Weird, eh? I bet none of your high schools taught either of those. They're both pretty new. Information theory is (veeery roughly) about data compression, and Kolmogorov Complexity is (also roughly) about algorithmic complexity. I.e., how small you can you make it, how long will it take, how elegant can the program or data structure be, things like that. They're both fun, interesting and useful. <BR><BR>信息理论和柯尔莫戈洛夫复杂性理论.真<NOBR>不可思议</NOBR>,不是么?我敢打赌没哪个高中会教你其中任何一门课程.她们都是新兴的学科.信息理论是(相当相当相当相当难懂)关于数据压缩,柯尔莫戈洛夫复杂性理论是(同样非常难懂)关于算法复杂度的.也就是说,你要把它压缩的尽量小,你所要花费的时间也就变的越长,同样的,程序或数据结构要变得多优雅也有同样的代价.他们都很有趣,也很有用.<BR><BR>There are others, of course, and some of the fields overlap. But it just goes to show: the math that you'll find useful is pretty different from the math your school thought would be useful. <BR><BR>当然,也有其他的一些因素,某些领域是重复的.也拿来说说吧:你所发现有用的那部分数学,不同于那些你在学校里认为有用的数学. <BR><BR>What about calculus? Everyone teaches it, so it must be important, right? <BR><BR>那微积分呢?每个人都学它,所以它也一定是重要的,不对吗? <BR><BR>Well, calculus is actually pretty easy. Before I learned it, it sounded like one of the hardest things in the universe, right up there with quantum mechanics. Quantum mechanics is still beyond me, but calculus is nothing. After I realized programmers can learn math quickly, I picked up my Calculus textbook and got through the entire thing in about a month, reading for an hour an evening. <BR><BR>好吧,微积分实际上是相当容易的.在我学习它之前,它听上去好像是世界上最难的一件事,好像和量子力学差不多.量子力学对我来说真的不是那么容易理解,但是微积分却不是.在我意识到程序员能够快速的学习数学时,我拿起一些微积分课本用一个月通读了整本书,一个晚上读一小时. <BR><BR>Calculus is all about continuums — rates of change, areas under curves, volumes of solids. Useful stuff, but the exact details involve a lot of memorization and a lot of tedium that you don't normally need as a programmer. It's better to know the overall concepts and techniques, and go look up the details when you need them. <BR><BR>微积分都是关于连续统的 -- 变化的比率, 曲线的面积, 立体的体积.是些有用的东西,但是实际细节却包含大量的记忆量并且枯燥,作为一个程序员来说根本不需要这些. 更好的方法是从整体上了解那些概念和技术,在必要的时候再去查询那些细节. <BR><BR>Geometry, trigonometry, differentiation, integration, conic sections, differential equations, and their multidimensional and multivariate versions — these all have important applications. It's just that you don't need to know them right this second. So it probably wasn't a great idea to make you spend years and years doing proofs and exercises with them, was it? If you're going to spend that much time studying math, it ought to be on topics that will remain relevant to you for life. <BR><BR>几何,三角,微分,积分,圆锥曲线,微分方程,和他们的多维和多元 -- 这些都有重要的应用.不过这时候不需要你去了解它们.这大概不是个好注意让你年复一年的去做证明和它们的练习题,不是吗?如果你打算花大量的时间去学习数学,那也是和你生活相关的部分. <BR><BR>The Right Way To Learn Math <BR><BR>学习数学的正确方法 <BR><BR>The right way to learn math is breadth-first, not depth-first. You need to survey the space, learn the names of things, figure out what's what. <BR><BR>正确学习数学的方法是广度优先,而非深度优先.你需要生存在空间里,学习事物的名字,区分出什么是什么. <BR><BR>To put this in perspective, think about long division. Raise your hand if you can do long division on paper, right now. Hands? Anyone? I didn't think so. <BR><BR>以透视的方法来对待的话,考虑用用长整除.(汗一个,感觉译的不准确)现在就举起你的手如果你能在纸上做长整除.手吗?谁呢?我可不这么认为. <BR><BR>I went back and looked at the long-division algorithm they teach in grade school, and damn if it isn't annoyingly complicated. It's deterministic, sure, but you never have to do it by hand, because it's easier to find a calculator, even if you're stuck on a desert island without electricity. You'll still have a calculator in your watch, or your dental filling, or something, <BR><BR>回头看看在学校里学过的长除法,要是不让你觉得烦恼和愤怒才怪.当然,这是显然的,但你不一定要自己亲自去做,因为很容易用计算器来做,即使你不幸在一座没有电力的荒无人烟的小岛上.你起码还有个计算器,在的手表上,补牙的什么东东,或其他什么上面. <BR><BR>Why do they even teach it to you? Why do we feel vaguely guilty if we can't remember how to do it? It's not as if we need to know it anymore. And besides, if your life were on the line, you know you could perform long division of any arbitrarily large numbers. Imagine you're imprisoned in some slimy 3rd-world dungeon, and the dictator there won't let you out until you've computed 219308862/103503391. How would you do it? Well, easy. You'd start subtracting the denominator from the numerator, keeping a counter, until you couldn't subtract it anymore, and that'd be the remainder. If pressed, you could figure out a way to continue using repeated subtraction to estimate the remainder as decimal number (in this case, 0.1185678219, or so my Emacs M-x calc tells me. Close enough!) <BR><BR>为什么他们还教你这些呢?为什么我们感到含混心虚讷,如果我们不能记住怎样去做?这不是好像我们需要再次知道她.除此以外, if your life were on the line,你可以运用任意大的数来做长除法.相象你被囚禁在第三世界的地牢里,那儿的独裁者是 不会放你出来的,除非你计算出 219308862/103503391.你会怎么做呢?好吧,很容易.你开始从分子减去分母,直到不能再减 只剩余数为止.if pressed,你可以想个办法估计好作为十进制的余数反复来减(这种情况下,0.1185678219,Emacs M-x calc 告诉我的.够精确了! ) <BR><BR>You could figure it out because you know that division is just repeated subtraction. The intuitive notion of division is deeply ingrained now. <BR><BR>你也许能明白因为你知道除法就是反复的减.对除法概念的直觉是根深蒂固的. <BR><BR>The right way to learn math is to ignore the actual algorithms and proofs, for the most part, and to start by learning a little bit about all the techniques: their names, what they're useful for, approximately how they're computed, how long they've been around, (sometimes) who invented them, what their limitations are, and what they're related to. Think of it as a Liberal Arts degree in mathematics. <BR><BR>学习数学的正确方法是忽略实际的算法和证明,对于大部分情况来说, ...:他们的名字,他们的作用,他们计算的大致步骤, (有时是)谁发明了他们,发明了多久了,他们的缺陷是什么,和他们相关的有什么.把数学当文科来学. <BR><BR>Why? Because the first step to applying mathematics is problem identification. If you have a problem to solve, and you have no idea where to start, it could take you a long time to figure it out. But if you know it's a differentiation problem, or a convex optimization problem, or a boolean logic problem, then you at least know where to start looking for the solution. <BR><BR>为什么讷?因为第一步应用在数学上的是问题的确定.如果你有一个问题去解决,并且如果你没有头绪如何开始, 这将花费你很长的时间来弄明白.但如果你知道这是个变异的问题,或者是一个凸优化问题,或者一个布尔的逻辑问题, 然后你起码能知道从哪着手开始寻找<NOBR>解决方案</NOBR>. <BR><BR>There are lots and lots of mathematical techniques and entire sub-disciplines out there now. If you don't know what combinatorics is, not even the first clue, then you're not very likely to be able to recognize problems for which the solution is found in combinatorics, are you? <BR><BR>现在有许许多多的数学技术和整个的学科分支.如果你不知道组合逻辑是什么,甚至连听都没听说过, 那么你是不可能意识到在组合逻辑中可以找到的解决答案的问题的,难道你会么? <BR><BR>But that's actually great news, because it's easier to read about the field and learn the names of everything than it is to learn the actual algorithms and methods for modeling and computing the results. In school they teach you the Chain Rule, and you can memorize the formula and apply it on exams, but how many students really know what it "means"? So they're not going to be able to know to apply the formula when they run across a chain-rule problem in the wild. Ironically, it's easier to know what it is than to memorize and apply the formula. The chain rule is just how to take the derivative of "chained" functions — meaning, function x() calls function g(), and you want the derivative of x(g()). Well, programmers know all about functions; we use them every day, so it's much easier to imagine the problem now than it was back in school. <BR><BR>但那实在是个大新闻哪,因为阅读这些领域,学习实际算法,建模和计算结果的方法,记住这些名字都是容易的.在 学校里他们教你链式法则,你也能回忆起他们并能运用在考试题上,但有多少学生能真正的了解他们到底意味着什么呢? 所以当他们遇到变种的链式问题时他们就不懂得如何运用公式了.让人感到讽刺的是,了解这是什么比记住如何运用公式 更为容易.链式法则仅仅是如何对链式函数求导的意思,函数 x() 引用函数 g() ,你要求导 x(g()) .好,程序员知道 所有和函数相关的;我们每天都使用他们,所以现在这比过去在学校更加容易能够相象出问题. <BR><BR>Which is why I think they're teaching math wrong. They're doing it wrong in several ways. They're focusing on specializations that aren't proving empirically to be useful to most high-school graduates, and they're teaching those specializations backwards. You should learn how to count, and how to program, before you learn how to take derivatives and perform integration. <BR><BR>这就是为什么我认为他们以错误的方式在教数学. 对大多数高中毕业生来说,他们专门教授的内容不是可以靠经验来证明数学是如何有用的,他们教的那些恰恰是非经验式的内容.在你学习如何求导和做积分之前,你将要学习如何计数,怎样编程. <BR><BR>I think the best way to start learning math is to spend 15 to 30 minutes a day surfing in Wikipedia. It's filled with articles about thousands of little branches of mathematics. You start with pretty much any article that seems interesting (e.g. String theory, say, or the Fourier transform, or Tensors, anything that strikes your fancy.) Start reading. If there's something you don't understand, click the link and read about it. Do this recursively until you get bored or tired. <BR><BR>我认为学习数学最好的方法是每天花15到30分钟逛维基百科.那上面有数千数学分支的相关文章. 可以从一些你感兴趣的文章着手(比如,炫理论,或者,傅立叶变换,或者张量理论,就是能冲击你相象力的东西) 阅读.如果有什么你不理解的,就去了解那些链接.如此这般直到你累到不行. <BR><BR>Doing this will give you amazing perspective on mathematics, after a few months. You'll start seeing patterns — for instance, it seems that just about every branch of mathematics that involves a single variable has a more complicated multivariate version, and the multivariate version is almost always represented by matrices of linear equations. At least for applied math. So Linear Algebra will gradually bump its way up your list, until you feel compelled to learn how it actually works, and you'll download a PDF or buy a book, and you'll figure out enough to make you happy for a while. <BR><BR>几个月后,这么做会纵向扩展你的数学知识面.比如,你会发现一些模式--比如,数学的每个分支看上去都包括了一个有着复杂的多元版本的变量,所以线性代数将会琢建爬满你的 书单列表,直到你强迫自己学会他实际上是怎样工作的,你要下载个电子书或买本书,直到你 能从中找到乐趣. <BR><BR>With the Wikipedia approach, you'll also quickly find your way to the Foundations of Mathematics, the Rome to which all math roads lead. Math is almost always about formalizing our "common sense" about some domain, so that we can deduce and/or prove new things about that domain. Metamathematics is the fascinating study of what the limits are on math itself: the intrinsic capabilities of our formal models, proofs, axiomatic systems, and representations of rules, information, and computation. <BR><BR>藉着维基百科,你也能快速的找到一条了解数学基本原理的途径,条条大道通罗马.在某些领域,数学几乎总是形式化我们的"常识",所以我们能减少或证明那些领域里的新事物.对数学本身的研究就是无止境而且令人着迷的:构造形式模型本质的能力,证明,自明的系统, 规则表示,信息,和计算. <BR><BR>One great thing that soon falls by the wayside is notation. Mathematical notation is the biggest turn-off to outsiders. Even if you're familiar with summations, integrals, polynomials, exponents, etc., if you see a thick nest of them your inclination is probably to skip right over that sucker as one atomic operation. <BR><BR>符号是个很重大的但很快被放弃的东西.数学符号是关闭你通往另一个世界的符咒.即使你熟悉累加,积分,多项式,指数,等等,如果你看到一堆符号堆彻的异常复杂时,你就把他实现的功能简单的当成一个原子操作好了,不要深究太多. <BR><BR>However, by surveying math, trying to figure out what problems people have been trying to solve (and which of these might actually prove useful to you someday), you'll start seeing patterns in the notation, and it'll stop being so alien-looking. For instance, a summation sign (capital-sigma) or product sign (capital-pi) will look scary at first, even if you know the basics. But if you're a programmer, you'll soon realize it's just a loop: one that sums values, one that multiplies them. Integration is just a summation over a continuous section of a curve, so that won't stay scary for very long, either. <BR><BR>然而,从观察数学来说,尝试着明白人们正在试图解决的问题(那些已被证明了的问题某天也许会对你有实际用途), 你会开始在符号中看到相同的类型,你也不再排斥他们.比如,累加符号(大写符号-西格马)或者 product sign(大写符号-pi)起初看上去让人心里没底,即时你了解了他们的基本原理.但如果你是个程序员,你会认识到他仅仅是个循环:一个累加 值,一个累乘.积分是一段连续曲线的相加,所以那不会让你郁闷太久. <BR><BR>Once you're comfortable with the many branches of math, and the many different forms of notation, you're well on your way to knowing a lot of useful math. Because it won't be scary anymore, and next time you see a math problem, it'll jump right out at you. "Hey," you'll think, "I recognize that. That's a multiplication sign!" <BR><BR>一旦你习惯了数学的许多分支,和许多不同的符号的格式,你就走在了解许多数学知识的 路上了.因为你不再害怕,你将会发现问题,其实他们会自动跳到你面前."嗨,"你会思索,"我 了解这个.这是乘法符号!" <BR><BR>And then you should pull out the calculator. It might be a very fancy calculator such as R, Matlab, Mathematica, or a even C library for support vector machines. But almost all useful math is heavily automatable, so you might as well get some automated servants to help you with it. <BR><BR>这样你就能扔掉计算器了.有一个充满相象的计算器比如 R,Matlab,Mathematica,甚或是 支持向量机的C语言库.但几乎所有有用的数学都是重型自动机,所以你能够让一切都变的自动化. <BR><BR>When Are Exercises Useful? <BR><BR>练习有啥用处呢? <BR><BR>After a year of doing part-time hobbyist catch-up math, you're going to be able to do a lot more math in your head, even if you never touch a pencil to a paper. For instance, you'll see polynomials all the time, so eventually you'll pick up on the arithmetic of polynomials by osmosis. Same with logarithms, roots, transcendentals, and other fundamental mathematical representations that appear nearly everywhere. <BR><BR>在做了几年的业余数学爱好者之后,你打算做更多的数学,甚至你从没碰过铅笔和纸.比如, 你会一直看到多项式,所以最后你会耳濡目染的做起多项式的运算.同样的,对数,根,超越数,和其他到处出现的基本数学原理. <BR><BR>I'm still getting a feel for how many exercises I want to work through by hand. I'm finding that I like to be able to follow explanations (proofs) using a kind of "plausibility test" — for instance, if I see someone dividing two polynomials, I kinda know what form the result should take, and if their result looks more or less right, then I'll take their word for it. But if I see the explanation doing something that I've never heard of, or that seems wrong or impossible, then I'll dig in some more. <BR><BR>我还是得到了一种感觉我要亲手做许多的练习题.我正在寻找一种能够跟着证明步骤的方法,比如使用一种"貌似可信的测试",如果他们的结果看上去或多或少是对的,然后我就会拍拍屁股过去了.但如果我看着的那个说明我从来没听说过,亦或看上去是错的或不可能的情况,我就会挖更多的东西了. <BR><BR>That's a lot like reading programming-language source code, isn't it? You don't need to hand-simulate the entire program state as you read someone's code; if you know what approximate shape the computation will take, you can simply check that their result makes sense. E.g. if the result should be a list, and they're returning a scalar, maybe you should dig in a little more. But normally you can scan source code almost at the speed you'd read English text (sometimes just as fast), and you'll feel confident that you understand the overall shape and that you'll probably spot any truly egregious errors. <BR><BR>这很像读程序源代码,不是么?当你读某人的代码你不需要手动模拟整个程序状态;如果你知道计算过程大致会发生什么情形,你能理智简单检测出结果.举个例子,如果结果是个列表,他们返回一个标量,可能你会挖的更深一点.但正常情况下你能扫描源代码几乎是以你阅读英文文本的速度(有时仅仅是速度上),并且你自信你理解了全部状态,同时你也许会发现任何真正令你震惊的错误。 <BR><BR>I think that's how mathematically-inclined people (mathematicians and hobbyists) read math papers, or any old papers containing a lot of math. They do the same sort of sanity checks you'd do when reading code, but no more, unless they're intent on shooting the author down. <BR><BR>我认为那就是数学爱好者(数学家和真正的数学迷)怎样读数学论文的,或者任何包含了许多数学的旧论文.他们做了同样的分类检查,正如在你读代码的时候所做的,但是不只是这些,除非他们不想把作者的观点扳倒. <BR><BR>With that said, I still occasionally do math exercises. If something comes up again and again (like algebra and linear algebra), then I'll start doing some exercises to make sure I really understand it. <BR><BR>照那样说法,我还是偶尔做数学练习.如果那些(比如代数和线性代数)又不停的跑过来,然后我就开始做些练习去确定我是真正的理解她了. <BR><BR>But I'd stress this: don't let exercises put you off the math. If an exercise (or even a particular article or chapter) is starting to bore you, move on. Jump around as much as you need to. Let your intuition guide you. You'll learn much, much faster doing it that way, and your confidence will grow almost every day. <BR><BR>但我要强调这点:不要让练习使你分心.如果一个练习(甚或是一篇特别的文章或章节)开始让你烦恼,那就暂时丢一边继续前进.该跑路就坚决跑路.让你的直觉引导你.你会学的更多,更快,你的信心也会随之增长. <BR><BR>How Will This Help Me? <BR><BR>这些怎样才能帮到我? <BR><BR>Well, it might not — not right away. Certainly it will improve your logical reasoning ability; it's a bit like doing exercise at the gym, and your overall mental fitness will get better if you're pushing yourself a little every day. <BR><BR>也许不是--不能立刻奏效.但确实能帮助提升你的逻辑推理能力;好比是在体育馆做练习,你整体的能力会提升如果你每天都做一点的话. <BR><BR>For me, I've noticed that a few domains I've always been interested in (including artificial intelligence, machine learning, natural language processing, and pattern recognition) use a lot of math. And as I've dug in more deeply, I've found that the math they use is no more difficult than the sum total of the math I learned in high school; it's just different math, for the most part. It's not harder. And learning it is enabling me to code (or use in my own code) neural networks, genetic algorithms, bayesian classifiers, clustering algorithms, image matching, and other nifty things that will result in cool applications I can show off to my friends. <BR><BR>对我来说,我已经注意到一些我已经感兴趣的领域(包括人工智能,机器学习,自然语言处理,和模式识别)大量的使用到数学.如我已经挖的有点深度的领域,我已经发现他们使用的数学不再比我在中学的学到的数学还要更难;大部分来说仅仅是不同领域.不是更难了, 并且学习使我能写(或者是在我自己的代码里使用)神经网络,基因算法,贝页斯分类器,集群算法,图像识别,和其他时髦的东西能产生很酷的应用.我常向我的朋友显宝. <BR><BR>And I've gradually gotten to the point where I no longer break out in a cold sweat when someone presents me with an article containing math notation: n-choose-k, differentials, matrices, determinants, infinite series, etc. The notation is actually there to make it easier, but (like programming-language syntax) notation is always a bit tricky and daunting on first contact. Nowadays I can follow it better, and it no longer makes me feel like a plebian when I don't know it. Because I know I can figure it out. <BR><BR>我已经渐渐意识到这点,当别人给我看一篇包含了数学符号的文章我不再像突然冒了一身冷汗:组合,微分,真值表,定列式,无限系列,等等.那些数学符号现在变得容易相处了,但(像编程语言的语法)一开始的话多少还是有点让人感到有些怪异.现在我能更好的理解了,当我一点不知道正在说什么时,也不再感到自己是个不懂数学的人了.因为我知道自己是能够弄明白的. <BR><BR>And that's a good thing. <BR><BR>那很好. <BR><BR>And I'll keep getting better at this. I have lots of years left, and lots of books, and articles. Sometimes I'll spend a whole weekend reading a math book, and sometimes I'll go for weeks without thinking about it even once. But like any hobby, if you simply trust that it will be interesting, and that it'll get easier with time, you can apply it as often or as little as you like and still get value out of it. <BR><BR>我会继续加油做的更好滴.我还有不少活头,有好多书和文章要读.有时我会花整个周末来读数学书,有时会数周都不再思索她.也和其他兴趣一样,如果你单纯的信任她你就会有兴趣,也能更容易的消磨时光,你可以经常一点点的尝试应用你觉得有趣的并且从中获益. <BR><BR>Math every day. What a great idea that turned out to be! <BR><BR>好好学习,天天数学!</P>
<P>原作者: <A href="http://steve-yegge.blogspot.com/2006/03/math-for-programmers.html" target=_blank hreflang=en rel=original>Steve Yegge</A>&nbsp;&nbsp;<IMG alt="" src="http://www.yeeyan.com/img/div.gif">&nbsp; 译者: <A href="http://www.yeeyan.com/space/show/pluto" target=_blank>puto</A>&nbsp;<A href="http://www.yeeyan.com/space/show/pluto" target=_blank></A>&nbsp;&nbsp;<IMG alt="" src="http://www.yeeyan.com/img/div.gif">&nbsp; <IMG alt="" src="http://www.yeeyan.com/img/div.gif">&nbsp; </P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=8370' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=8370</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[汉语编程-汉芯之后的中国软件界大骗局]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=8177</link>
<author>KPLer</author>
<pubDate>Thu, 18 Oct 2007 09:57:00 +0800</pubDate>
<description><![CDATA[
<P>一、闹得沸沸扬扬的汉语编程<BR>二、汉语编程其实是一个大骗局<BR>三．汇编都是英文的，其他变成汉语有什么用<BR>四、其实汉语编程很好创造出来，但是却没什么用<BR>五、中国人编程难的问题和出路在那里</P>
<P>&nbsp;</P>
<P><BR><STRONG><FONT color=#ff0000>一、闹得沸沸扬扬的汉语编程</FONT></STRONG></P>
<P>这几年以来，特别是最近一段时间，汉语编程闹得沸沸扬扬，大有我中华民族之骄傲，如果不加紧实行汉语编程，中华民族就要消失了。徽剑本对于汉语编程不以为然，一直没有理会。之所以写这篇文章，是因为徽剑前几天接到一电话，是北京一家公司打过来的，大谈推广汉语编程，要跟徽剑的公司合作在深圳推广，于是徽剑查了一下资料，发现这两年所谓的汉语编程这场闹剧居然愈演愈烈，于是徽剑不得不出来揭露下。对比去年的汉芯事件，徽剑认为，所谓的汉语编程只不过是另一场汉芯的重演而已。所以看完本文，特别是程序员朋友，如果您认为徽剑说的有理，请将本文多多转发到各种论坛，揭露这场骗局。</P>
<P>&nbsp;</P>
<P><BR>先来看新闻，2007年09月《通信产业报》以“汉语编程异军突起 民族产业出黑马”为题发表了一篇文章。开头是这样：</P>
<P>“当今世界，科技突飞猛进。网络改变了人们的生活和思维，成为人们学习和工作不可或缺的一部分。人们点击鼠标进行学习、工作和接收外界信息的时候，计算机程序设计语言在其中起到了至关重要的作用。很多年来，我们一直在使用国外的编程语言，人们已经习惯了用C语言、JAVA等计算机语言编写应用程序，实现人与计算机的完美对话。但是朋友您知道吗，真正属于我们自己的计算机程序设计语言——汉语编程已经问世，而且已经在诸多领域发挥了重要的作用。”</P>
<P>然后文章介绍了汉语编程：</P>
<P>“汉语编程萌发于1984年，1994年获得国家发明专利。汉语程序设计语言，不是对计算机语言的简单汉化，也不是为某种软件制造一个中文环境，而是中国人自已掌握全部源代码，使用汉字信息指令，从计算机底层入手，使计算机的中央处理器(CPU)能够处理存储器中的汉字词典，从而实现计算机对汉字程序的识别，不受现行操作系统控制的技术系统，且完全拥有独立的自主知识产权。”（呵呵，这段话里面的问题就先不说了）</P>
<P>在文章的末尾，还上升到了民族大义的高度：</P>
<P>“我们曾经因为闭关锁国错过了工业革命的巨轮，也曾忙于阶级斗争，而错过战后新技术发展的浪潮。如今，我们有了完全自主知识产权的计算机语言，其核心技术无可挑剔，且优势日益明显，我们不能再错过最好的发展时机。汉语编程是民族的，是国家的，中国这个有着5000年深远文化的泱泱大国，理应把它好好利用起来，发展和振兴我国民族产业，为中国人民所熟知和使用。”</P>
<P>徽剑在收集到的另外的资料还有这样报道：</P>
<P>“近日，用汉语编程实现的数据库开发环境将通过江苏省科技厅的验收。按照进程，汉语程序设计语言数据库开发环境项目完成后一年，项目承担方——南京汉语编程有限公司将以汉语编程数据库教育版为推广重点并进行其他工程开发。项目完成后两年，汉语编程数据库标准版将以OEM方式与国内PC制造商捆绑销售。项目完成后三年，将推出汉语编程数据库企业版参与政府、企业、部队信息化建设，部分替代进口产品。江苏省科技厅将对该项目投资三百万元。同样看好汉语编程的还有重庆市科委，他们的预期投资是上千万。汉语编程作为重大科技发明发现正在申请重庆市的国家级项目。重庆药监局正在应用汉语编程开发的数据库实现对所有下属药店的监管。目前这个项目完成了大部分，6月底将最后完工。”</P>
<P>当然徽剑在报道中也找到了不同的声音：“从2001到2002的两年间，北京市科委对汉语编程项目进行了5次评审。评审的结果是，超过50%的专家并不认可汉语编程的可行性，元易达没有能在北京市科委立项。元易达于是坚持“农村包围城市”的市场开发路线。当年对北京元易达公司进行评审的时候，原中国科学院计算机软件研究所研究院员仲萃豪这样评价，“用汉语编程语言开发数据库，这条路是相当艰巨的。汉语编程现在还只是一个小玩意。”<BR>&nbsp;<BR>看完这些，有人会问，到底这个汉语编程是怎么回事？到底有多大价值？对未来的发展有如何贡献？那么好，下面就来分析。</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P><BR><STRONG><FONT color=#ff0000>二、汉语编程其实是一个大骗局</FONT></STRONG></P>
<P><BR>我们知道一个骗局“汉芯事件”， 2003年2月，在摩托罗拉公司做测试的工程师陈进，将一片从美国买来的MOTO-free scale 56800芯片，雇请民工磨掉原有标志，然后加上自己的“标识”，变成了所谓“完全拥有自主知识产权”的“汉芯一号”，申请了多项专利，并借此当上了上海交大微电子学院院长、博导以及“长江学者”。</P>
<P>汉芯事件一大特点就是拿一块别人的芯片，简单修改一下，然后包装成自己的成果。这种如果是商业上，只要不侵犯别人权益也就无可厚非。但是作为科技开发就不同，讲究的是原创和事实。我们来对比下汉芯和汉语编程，我们会发现他们有惊人的易曲同工之妙。</P>
<P>报道这样说：“汉语程序语言是在1993年由北京百乐航天应用技术公司汉语工控部的沈志斌发布的，最初为PC1.0版，是一个16位版本，只能在MS－DOS环境下运行。2000年，沈志斌组建了北京元易达公司，专门从事汉语编程的产品开发。经过 近十年的发展，汉语程序语言目前最新的版本为2.03，能够在WINDOWS9X/NT环境下运行。”</P>
<P><BR>一开始的时候，徽剑也没明白这到底是什么语言，还以为这真是汉语编程的原创，只是觉得有些别扭，一来是觉得“汉语编程”的软件经过这么多年的发展，版本一直不变，是否让人难以理解？而且其开发界面极其难看，用反汇编软件居然发现汉编编译器主程序文件居然使用的是微软的VC运行库，这里让人极其不解，既然汉语编程都到了可以汉语汇编的程度，为什么编译器还要用VC来开发？</P>
<P>最近在铁血社区看到一篇文章，才完全证实了徽剑的猜测。</P>
<P>从词典看某“汉语编程”与Forth语言http://bbs.tiexue.net/post_2304429_1.html<BR>看完了文章上面的图片对比，相信只要有编程基础的人士都可以明白，这完全是彻头彻尾的剽窃。一个把开源代码复制过来，加以简单修改，然后包装成自己的原创。</P>
<P>这里很抱歉一开始的时候，徽剑对于这种叫Forth语言确实孤陋寡闻，徽剑正想自己动手比较的时候，有一位网友做了好事，先比较了下： <BR>原帖链接（http://www.xycq.net/forum/thread-152078-1-1.html），作者来个分析：</P>
<P>“汉语编程目前能够下载到的版本为2.03.1920，由于只使用一个版本的汉语编程，后面的描述中就省掉版本了。在铁血网中的帖子有一个简单的比较，用的是一个叫win32forth的forth实现，在其主页Download's中可以得到两个不同的版本，一个是4.2build671，另一个是6.12.00是目前最新的稳定版。在铁血帖中提到过wincon.dll这个文件，我也是从这个文件入手的。”</P>
<P>于是该网友用VC6中的Depends查看三了个wincon.dll的结果。发现入口非常相似，也就是有可能是差不多的文件。于是该网友考虑了将三个DLL进行互换。</P>
<P>“将三个dll文件复制到一起，先将三个文件复制到win32forth4.2中，分别使用三个dll后启动WIN32FOR.EXE的结果发现“汉语编程的wincon.dll文件能够被win32forth4.2正常使用，而且读出来的数值与汉语编程环境下一致，都是10895。由于接口改变，4.2和汉语编程的wincon.dll都不能在6.12中使用了。而win32forth4.2版与6.12版的wincon.dll文件都能够在汉语编程环境下使用，而且读出的值都与原环境下一致。综上情况，汉语编程与win32forth在wincon.dll文件上保持了相当好的兼容性，如果说二者一点关系都没有，形成这种结果的几率不知道能有多大。”</P>
<P>更为搞笑的是，当该网友试着将汉语编程程序和win32forth4.2目录下的这个同名文件WINCON.DLL删除时居然发现汉语编程与4.2的提示基本一致（徽剑测试时除了标题的两个字母大小写不同外其他一致）。该网友不禁问：“这也是巧合吗？一个号称汉语的居然冒出一句英文的提示而且还跟别人的如此相似，而且是"Missing procedures!"这种计算机程序中少见的用词以及少见的标题栏中用标点。”</P>
<P>“将汉语编程的win32chp.dll文件复制到win32forth4.2文件夹下并命名为win32for.img，当然之前要备份好原来的win32for.img文件；将汉语编程的ckernel.ovl复制到win32forth4.2文件夹下。然后找一个16进制编辑器，打开win32for.img文件，从偏移4（也就是第5个字节）开始，连续4个字节修改为D5 11 92 01，保存。双击win32for.exe，”</P>
<P>徽剑看到的是居然看到的是带着win32forth 4.2图标的汉语编程。</P>
<P>最后该网友总结到：“说到底，汉语编程应该是这么来的，由于win32forth的源码是公开的，汉语编程利用其源代码将win32forth字样抹去，并且修改了识别词库文件的标志（将win32forth的D5 11 92 01修改为DA B7 6E EF），编译出可执行程序。然后又根据需要，汉化及添加、修改了词库形成了现在用汉字和一堆全角符号编程的汉语编程语言。可以说汉语编程为了掩盖其与win32forth的关系，将符号修改的很彻底，也不管那一堆全角符号用起来多么古怪。”</P>
<P>“如果继续研究下去，我想还会掌握更多的证据，甚至有希望根据wincon.dll和winapi词数找到汉语编程使用的那个版本的win32forth，不过目前我觉得这些证据已经足够了，已经不需要再浪费时间了。”</P>
<P>最后作者得出结论：</P>
<P>“其实汉语编程就是win32forth的一个修改版，实现的功能基本上都是win32forth实现的。把这个东西吹嘘为民族的希望，汉语编程需要带的ckernel.ovl和win32forth 4.2需要带的kernel.bin文件都是词库（其实就是编译过一次的字节码）的要求，比如要是用汉语编程的编辑器winedit.dll替换成win32for.img的话就不需要带ckernel.ovl了。注意观察一下汉语编程的各个程序，都是由同名的一个exe文件和一个dll文件组成的，那个dll文件并不是真正的win32格式的dll文件，而是与win32forth 4.2的img仅差一个标志的一种格式；而那个exe文件其实都是可以互换使用的，当然跟win32forth 4.2互换都没有问题。”</P>
<P>看到没有，一个骗子。一个跟汉芯一样的骗子。</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P><STRONG><FONT color=#ff0000>三．汇编都是英文的，其他变成汉语有什么用</FONT></STRONG></P>
<P>下面来介绍下语言的基础，（这部分主要是给对编程不是很了解的人士看的，有些地方不严谨，但是只要说明意思就可以了）</P>
<P>我们先看语言基础，我们平时看到的电脑每做的一次动作，一个步骤，都是按照以经用计算机语言编好的程序来执行的，程序是计算机要执行的指令的集合，而程序全部都是用我们所掌握的语言来编写的。所以人们要控制计算机一定要通过计算机语言向计算机发出命令。计算机语言的种类非常的多，总的来说可以分成机器语言，汇编语言，高级语言三大类。 </P>
<P>计算机所能识别的语言只有机器语言，即由0和1构成的代码。但通常人们编程时，不采用机器语言，因为它非常难于记忆和识别。目前通用的编程语言有两种形式：汇编语言和高级语言。 </P>
<P>作为机器语言，其核心是如何控制内部运算，对于不同的CPU架构体系，其机器语言也会不同。表现出来的就是指令集，CPU依靠指令来计算和控制系统，每款CPU在设计时就规定了一系列与其硬件电路相配合的指令系统。</P>
<P>汇编语言的实质和机器语言是相同的，只不过指令采用了英文缩写的标识符，更容易识别和记忆。使用汇编语言编写的程序，机器不能直接识别，要由一种程序将汇编语言翻译成机器语言，这种起翻译作用的程序叫汇编程序，由于汇编语言只是机器语言的符号化,虽说相对简单了,但是还是得要求人们学习相应的内部结构,对于复杂的内部结构,有很大一部分人还是无从着手的.所以就出现了高级语言,当程序员用高级语言指令写完源程序后,只需用编译器编译就可运行了.此时编译器所做的工作就是把高级语言指令翻译成汇编语言(机器语言。.</P>
<P>对于软件开发者来说，他需要考虑的是CPU的指令集，也就是CUP指令集的汇编指令，只有针对这些指令才能开发出相应的程序来，举例来说，你在基于英特尔CUP的汇编指令上开发的程序，就不能在苹果电脑上运行。而这些汇编指令集都是CUP等硬件厂商开发提供的，目前我们知道CUP的大部分厂商都是海外公司，他们的指令集（都是汇编语言写成）都是英文的。</P>
<P>高级语言是目前绝大多数编程者的选择。和汇编语言相比，它不但将许多相关的机器指令合成为单条指令，并且去掉了与具体操作有关但与完成工作无关的细节，这样就大大简化了程序中的指令。高级语言如目前流行的VB、VC、FoxPro、Delphi等，高级语言所编制的程序不能直接被计算机识别，必须经过转换才能被执行。 </P>
<P>通常而言,人们写程序有两种方式，<BR>一是直接用汇编语言写，然后翻译成机器语言。<BR>二是用高级语言写，然后编译器翻译成汇编，最后翻译成机器语言。</P>
<P>也就是说，程序语言的编写分为三个层次。</P>
<P>第一层次（最低层次）是机器语言&nbsp; 其语言都是01.<BR>第二层次是汇编语言（使用不同的CUP指令集）其语言都是英文<BR>第三层次是高级语言&nbsp; </P>
<P>我们会发现一点，不过你采用什么语言编写，最终的都是要编译成汇编语言然后到机器语言，最终都是要调用CUP指令集。（这里需要指出的是，任何汇编指令集，都是硬件开发厂商开发的，而不是什么程序语言公司开发的。）就目前而言，这块都是英语，目前国内有人推出的汉语汇编编程，徽剑觉得啼笑皆非，就汇编语言而言，是直接对CPU等硬件操作的，必须依赖各种指令集，而这些厂商，有几个提供汉语指令集？</P>
<P>在没有硬件厂商提供的汉语指令集前提下，所谓的汉语汇编是不是“鸡对鸭讲”？这么一来是不是要有人把英文指令集翻译成汉语？那跟汉化有什么区别？</P>
<P>这样一来任何人都可以开发出一套汉语汇编来，很简单，找一套汇编编译器，增加一个翻译过程，当输入汉语时，将其翻译成对应的英文汇编程序，然后再翻译成机器语言，或者直接采用替换方式，当输入英文的时候，将其翻译成（英文对应）的机器语言。</P>
<P>任何汇编指令集，都是硬件开发厂商开发的，而不是什么程序语言公司开发的。让程序开发者利用汇编语言来操作他们的硬件。除非硬件厂商提供直接针对汉语的指令集，否则任何所谓的汉语汇编都是，翻译器加汇编编译器。</P>
<P>也就是说，在汇编领域，目前并未有任何厂商提供汉语指令的指令集，那么意味我们所谓的“先进的汉语汇编”就不是什么自主开发的东西。那么这里有一点就可以明了，就是目前的真正的汇编都是英文的。汉语汇编其实只是“假汇编”。</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P><STRONG><FONT color=#ff0000>四、其实汉语编程很好创造出来，但是却没什么用</FONT></STRONG></P>
<P><BR>前面谈到的那个“汉编”事实上是个骗子，下面徽剑要说说不是骗子的汉语编程，以易语言为例。</P>
<P>易语言是曾经和朱崇君一起开发CCED的吴涛于 2000年初开始开发的，这是一款Windows下全中文可视化编程语言，最新版本为 4.0。易语言自发布后，以其类似于VB的风格和彻底中文化的特点赢得了不少电脑爱好者的青睐，</P>
<P>易语言的特点就是用汉语来写，原来编写程序输入的是英文，现在改成输入汉字了，我们来看段易语言程序：</P>
<P>引入 apr;<BR>公开 类 启动类<BR>{<BR>&nbsp;公开 静态 启动()<BR>&nbsp;{<BR>&nbsp; 整数 数量;<BR>&nbsp; 控制台.输出行("请输入将要生成的随机数个数:");<BR>&nbsp; 数量= 控制台.输入整数();<BR>&nbsp; <BR>&nbsp; 随机数集合.显示(数量);<BR>&nbsp; <BR>&nbsp; 随机数集合.显示();<BR>&nbsp;} <BR>}<BR>公开 类 随机数集合<BR>{<BR>&nbsp;公开 静态 显示(整数 生成个数=10)<BR>&nbsp; 字节集 临时字节集;<BR>&nbsp; 整数 I,J;<BR>&nbsp; 内存池 局内存池 = 创建 内存池;<BR>&nbsp; 控制台.输出行("下面开始生成"+生成个数.到文本+"个随机数====&gt;");<BR>&nbsp; <BR>&nbsp; 计次循环(生成个数,J)<BR>&nbsp; {&nbsp;&nbsp; <BR>&nbsp;&nbsp; 临时字节集=随机数.生成随机数(1,局内存池);<BR>&nbsp;&nbsp; I=字节集类.到整数(临时字节集);<BR>&nbsp;&nbsp; 控制台.输出行(整数类.到文本(I));<BR>&nbsp; }<BR>&nbsp; 控制台.输出行("&lt;========随机数已生成");<BR>&nbsp; 控制台.输入文本();//暂停屏幕滚动用&nbsp;&nbsp;&nbsp; <BR>&nbsp;}&nbsp; <BR>}</P>
<P>事实上，徽剑看不出这里有什么优势，懂中文的人似乎也没几个能明白。有人说易语言似乎对于英语不好的人有帮助，其实很荒谬，因为如果但是写程序部分所使用的英文数量是很少的，常用的也就几十个英文单词，一般情况下也就几百个英文单词。也就是说，如果仅仅考虑到“写程序”这块而言，会个三五百单词足够，这点数量的单词相信没有几个人学不会。</P>
<P>我们必须看到而真正出问题的在于“接口”上面，前面说了，目前的操作系统、几乎所有的各种应用程序都是英文编写的，所谓的中文版只是在用户界面做了汉化，这样一来，用汉语编写的程序如果要在操作系统上运行、或者与其他程序交换数据，不可避免的遇到英文代码，特别是操作系统，比如windows下的API等而这些接口又是成千上万，如果没有很好的英文是很头疼的。</P>
<P>更为甚者，这些接口的文档大多都是英文编写，没有好的英文水平是阅读不了的。也就是说如果你想成为程序高手，英文是必须解决的拦路虎。也许有一天有了全中文的硬件指令集、全中文代码的操作系统，那时候我们就可以说用中文编程了。就目前而言对于专业程序员而言，汉语作为程序设计的描述语言并没有什么实际意义。</P>
<P>如果仅仅是考虑普通用户不懂英文，不会“写程序”，那么徽剑提出一个更为简单的方法：“汉化”，我们可以分为这么几步走：</P>
<P>第一步，对汇编编程器进行汉化，使其在输入汉语汇编指令时自动对应相应的机器语言。</P>
<P>第二步，对诸如C、C++等编译器进行汉化，将其内部对应的英文指令替换成汉语，这样一来在输入汉语C、C++程序时可以直接编译。</P>
<P>第三步，编译C、C++等的教材，将其中英文描述换成规范的汉语程序词汇。同时大量翻译各种英文指令书籍，便于中文编程人员查找。</P>
<P>第四步，创立汉语操作系统，找一套开放源码的LINUX，修改其编译器，将编译器输入对应的英文换成汉语，然后将全部源代码翻译成汉语，再用编译器编译一下。当然个别地方要考虑到汉语的编码特点修正一下。徽剑计算，依照几十名翻译人员，差不多一年可以完成，看看一套全面的汉语代码操作系统出来了，</P>
<P>看到没有，就这么几步，连强大的C、C++等都成了汉语编程语言了。如果想傻瓜点，也可以啊，跟微软合作、跟SUN合作，可以把.net、JAVA全部汉化了，想来他们也没有什么反对的。</P>
<P>有人说：“汉语编程的优点概括为以下几个方面：首先是安全系数高。汉语编程是我们用汉语实现的人机对话，我们掌握所有的源代码，目前尚未发展能与之对抗的病毒，非常有利于保证计算机内的机密安全。”</P>
<P>这纯粹胡扯，目前的计算机语言，特别是诸如C、C++语言本身都是免费的、开放的，任何人都可以学习、使用。就像相对论不是中国人发现的，但是我们一样用，这只是一种知识而已，如何在这种知识上开发成果来，那是另外一回事。一种知识是谈不上安全的。我们并不因为飞机是外国人发明的，我们自己造飞机就泄露了什么机密。假如我们完全用自己的汉语编程，难道国外特工就不会学吗？难道国外的信息部队就不会针对这个开发病毒吗？而且还是一开一个准，因为你是单独的，与众不同，开发针对你的不用担心自己受影响。</P>
<P><BR>有人说：“汉语编程是效率高。汉语编程的原理是建立在汉字的本身优势上，汉字看起来很复杂，但表达的意义却很丰富。且在键盘上输入汉字远比输入英文快，用汉语编程写出的程序远比其他语言篇幅要短很多。”</P>
<P>这里同样也是胡说，请问一下，当你在键盘上输入“if”快还是“如果”快，是输入“end”快还是“结束”快？要知道在编程的英语不是日常的英语，完全可以说是一种新的人类语言，在键盘上输入汉字只是在总的信息量上比英文多，而不是单位数量汉字敲击键盘的次数比英文少。徽剑做过简单测试，发现以C++为例，如果把C++翻译成汉语输入，单位时间内的击键次数是英文的很多倍。</P>
<P><BR>有人说：“汉语编程是简单易学，便于普及。只要认识汉字，上到九十九下到刚会走，都可以学习和使用。”</P>
<P>这更是胡说八道，如同前面分析的那样，用汉语“写程序”是方便了，可是还有那么多英文接口、英文文档怎么办？再说了，有必要来个全民编程吗？美国普通人也没几个会编程的。而且我们看看上面的易语言代码，光是认识汉字的人明白吗？</P>
<P><BR>我们还是看一段评论：“从理论上讲，汉语编程应当是一种以汉语为描述语言的计算机程序设计语言，在程序设计 中体现了汉语语法和逻辑，符合中国人的语言习惯和思维方式，而不是英文程序设计语言的简单汉化，或者是简单地营造一个汉语编程环境。很遗憾的是，目前我们 所能见到的汉语编程语言，就只不过停留这个层次上，并没有取得任何实质性的突破。事实上，从2001年到2002年间，北京市科委对汉语编程项目 进行了5次评审，评审的结果是超过50%的专家并不认可汉语编程的可行性。”</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P><BR><STRONG><FONT color=#ff0000>五、中国人编程难的问题和出路在那里</FONT></STRONG></P>
<P><BR>下面我们看看中国人编程难难在那里？</P>
<P>徽剑以一个拿到（说混到也可以）的系统分析员证书的编程者的亲身体验，中国人编程难难在难在接口语言和技术资料语言上，而不是“写程序”的语言上。学过编程的朋友都知道，程序中绝大部分都是逻辑和数学表达式，与采用英语还是汉语来描述的关系实质并不大。</P>
<P>就程序而言，不管学习编程的是谁，是中国人，还是美国人，有一个共同的难点。那就是计算机语言不是我们人类日常交流的语言，越是效率高的编程语言，越是离人们日常生活交流语言较远。这点上是共同的。</P>
<P>而中国人真正不利之处就是如果英文不熟练，无法阅读技术文档（诸如C++、Java中上万个用英文的库函数也不是需要编程者都得记住的东西），无法理解大量的接口等英文信息。而这一点就不是简单用汉语编程那么简单了。世界上最著名的软件公司，大多是母语为英语的国家。印度现在之所以成为世界第二软件大国，因其母语是英语，这样一来在阅读和学习过程中接触相关技术就没有什么障碍。</P>
<P>依照我们目前的发展条件，短期内不大可能出现诸如硬件、操作系统等的全国产化，这样一来如果我们还是热衷于所谓的用“汉语写”程序的话，就未免搞笑了。其实我们来看看编程的发展历史：</P>
<P>最早期，直接对硬件编程，使用机器语言和汇编语言。<BR>后来，出现高级语言，在一定程度便于人们的理解了。<BR>再后来，出现面向对象的程序开发，使得程序开发进一步容易理解和实施。<BR>现在流行的是面向对象的可视化程序开发，每个语言本身都是“不可视”的，仅仅是语言而已；所谓“可视化”不过是编程工具所提供的功能，让你在编窗口等一些“看到着”的程序时可以使用拖拽等可视化操作。 如同C++是门语言，而vc++只是一个可视化编程工具,vc++实现了C++的可视化编程。</P>
<P>有过较长期编程经验的老程序员都会有这演感受，在十年前写C++语言程序是很累的(那时国内还很少大家都是用C较多)，现在用C++的话，可以用VS2005多方便啊。诸如.NET代码生成器有助于快速应用程序开发。</P>
<P>现在甚至不用写代码就可以生成很多小点的程序，这在十年前、二十年前是不可想象的，同样再过十年，不写代码生成很多今天看来是很大的程序也不是难事。所以徽剑以为在未来，程序员编程“写”的代码数量将会越来越少，程序员更多的考虑的是程序的结构和性能，然后动动鼠标，输入几个数据，一套程序就编好了。</P>
<P>在这种情况下，更多的内容被封装了，到那时，才可以说不懂英文也照样编程。这才是发展的趋势。</P>
<P>至于底层部分，那就只有等到国产的硬件出来了，推出大量中文指令集，才有实现真正汉语底层开发的可能。</P>
<P>来源：<A href="http://sziis.blog.163.com/blog/static/7455725200791721726745/?fromTip">http://sziis.blog.163.com/blog/static/7455725200791721726745/?fromTip</A></P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=8177' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=8177</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[一步一步学KPL【9】：如何对按键进行处理？如何处理字母精灵的爆炸效果？]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=6698</link>
<author>KPLer</author>
<pubDate>Sun, 19 Aug 2007 16:20:00 +0800</pubDate>
<description><![CDATA[<P>&nbsp;</P>
<P><BR>为了完成最后的按键处理和爆炸处理过程，我们需要在游戏循环内增加一个新的方法：HandleKeys()</P>
<P>该方法的位置如下：</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;While GameOver=False<BR>&nbsp;&nbsp;&nbsp;Trace("animate!")<BR>&nbsp;&nbsp;&nbsp;Animate()<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;Trace("HandleKeys!")<BR>&nbsp;&nbsp;&nbsp;HandleKeys()&nbsp;&nbsp; //新增该行<BR>&nbsp;&nbsp;End While<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Alert("Game Over!","hehe")</P>
<P>HandleKeys的定义如下：</P>
<P>&nbsp;Method HandleKeys()<BR>&nbsp;&nbsp;Var key As String=GetKey()<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Trace("key:"+key)<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Var i As Int<BR>&nbsp;&nbsp;Var num As Int<BR>&nbsp;&nbsp;Var explodecount As Int<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;For i=1 To MaxCharNum<BR>&nbsp;&nbsp;&nbsp;If key=EnglishCharArray[CurIndexArray[i]].name And EnglishCharArray[CurIndexArray[i]].living=False Then<BR>&nbsp;//&nbsp;&nbsp;&nbsp;PlaySound( "Explosion1.wav" )<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;LoadSprite( "ExplodePlayer", "Explosion.gif" )<BR>&nbsp;&nbsp;&nbsp;&nbsp;MoveSpriteToPoint( "ExplodePlayer", GetSpriteLeft( "char"+i ), GetSpriteTop( "char"+i ) )<BR>&nbsp;&nbsp;&nbsp;&nbsp;SetSpriteZIndex( "ExplodePlayer", 5000 )<BR>&nbsp;&nbsp;&nbsp;&nbsp;ShowSprite( "ExplodePlayer" )<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;HideSprite( "char"+i )<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;For num = 1 To GetSpriteFrameCount( "ExplodePlayer" )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SetSpriteActiveFrame( "ExplodePlayer", num )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RefreshScreen()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Delay( 10 )<BR>&nbsp;&nbsp;&nbsp;&nbsp;Next <BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;UnloadSprite( "ExplodePlayer" )&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;EnglishCharArray[CurIndexArray[i]].living=True<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;explodecount=explodecount+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;If explodecount=MaxCharNum Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GameOver=True<BR>&nbsp;&nbsp;&nbsp;&nbsp;End If<BR>&nbsp;&nbsp;&nbsp;End If</P>
<P>&nbsp;&nbsp;Next</P>
<P>&nbsp;End Method</P>
<P>这段代码中，有些细节我们要好好交代一下，因为为了代码可以顺利执行，我们要对以前的代码做一些小的调整。</P>
<P>这段代码的思路如下：</P>
<P>【1】返回一个按键；</P>
<P>【2】判断该按键代表的字符精灵是否还在屏幕上，如果还在的话，则字母精灵爆炸消失；</P>
<P>要处理这个环节，我们需要把以前在Main方法内定义的两个变量放在该方法的外部，即放在数据类型定义的后面。这样原来的局部变量就变成了全局变量，可以在任意位置被访问了。</P>
<P>移动的变量是：</P>
<P>&nbsp;//初始化字母数组<BR>&nbsp;Var EnglishCharArray As EnglishChar[MaxCharNum]<BR>&nbsp;//保存随机字母顺序的数组<BR>&nbsp;Var CurIndexArray As Int[MaxCharNum]&nbsp;</P>
<P>为了标志已经爆炸使用过的字母精灵，我们为EnglishChar数据类型增加了一个新的属性:living,用于标识对应的字母精灵是否存活（爆炸后死掉，不再显示）</P>
<P>做出了上述调整后，以上的代码过程就不难理解了。</P>
<P>【3】屏幕上的字母爆炸完后，游戏结束。</P>
<P>字母爆炸的动画处理，可以参见KPL游戏示例编程中，飞机爆炸的代码，完全一样。</P>
<P><BR>到此为止，打字练习的游戏代码示范结束。你可以根据这个思路，修改成可以打字升级的游戏，也可以改变字母精灵出现的方式。</P>
<P>或者自己重新做一个完全不一样的程序。</P>
<P><BR>我们把最终的代码放在下面供大家参考：</P>
<P><BR>Program Demo</P>
<P>&nbsp;//自定义数据结构<BR>&nbsp;Structure EnglishChar<BR>&nbsp;&nbsp;index As Int&nbsp;&nbsp;//序号<BR>&nbsp;&nbsp;name As String&nbsp;&nbsp;//字母<BR>&nbsp;&nbsp;using As Bool&nbsp;&nbsp;//是否已被使用<BR>&nbsp;&nbsp;living As Bool<BR>&nbsp;End Structure<BR>&nbsp;<BR>&nbsp;//屏幕上的点的数据结构<BR>&nbsp;Structure Point<BR>&nbsp;&nbsp;x As Decimal<BR>&nbsp;&nbsp;y As Decimal<BR>&nbsp;End Structure</P>
<P><BR>&nbsp;&nbsp;<BR>&nbsp;//最大字母数<BR>&nbsp;Var MaxCharNum As Int=26<BR>&nbsp;<BR>&nbsp;//初始化字母数组<BR>&nbsp;Var EnglishCharArray As EnglishChar[MaxCharNum]<BR>&nbsp;//保存随机字母顺序的数组<BR>&nbsp;Var CurIndexArray As Int[MaxCharNum]&nbsp;<BR>&nbsp;<BR>&nbsp;Var oldPoint As Point[MaxCharNum]&nbsp; &nbsp;//用于保存图片移动前的位置<BR>&nbsp;Var curPoint As Point[MaxCharNum]&nbsp;//用于保存图片的当前位置<BR>&nbsp;Var xPoint As Point[MaxCharNum]&nbsp;&nbsp;//用于保存图片移动的偏移量<BR>&nbsp;<BR>&nbsp;Var GameOver As Bool=False<BR>&nbsp;<BR>&nbsp;<BR>&nbsp;<BR>&nbsp;Method Main()</P>
<P>&nbsp;&nbsp;// 初始化26个英文字母<BR>&nbsp;&nbsp;//Var CharArray As String[]={"a","b","c"}<BR>&nbsp;&nbsp;Var EnglishCharStr As String="a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z"<BR>&nbsp;&nbsp;Var CharArray As String[]=Split(EnglishCharStr,",")<BR>&nbsp;&nbsp;</P>
<P>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Var CharNum As Int<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;For CharNum=1 To MaxCharNum<BR>&nbsp;&nbsp;&nbsp;EnglishCharArray[CharNum].index=CharNum<BR>&nbsp;&nbsp;&nbsp;EnglishCharArray[CharNum].name=CharArray[CharNum]<BR>&nbsp;&nbsp;&nbsp;EnglishCharArray[CharNum].using=False<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;//调试语句<BR>&nbsp;&nbsp;&nbsp;Trace("indx:"+EnglishCharArray[CharNum].index)<BR>&nbsp;&nbsp;&nbsp;Trace("name:"+EnglishCharArray[CharNum].name)<BR>&nbsp;&nbsp;&nbsp;Trace("using:"+EnglishCharArray[CharNum].using)&nbsp;<BR>&nbsp;&nbsp;&nbsp;Trace("---------------------------------------")<BR>&nbsp;&nbsp;Next<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;<BR>&nbsp;<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Var CurNum As Int=1<BR>&nbsp;&nbsp;Var CurIndex As Int<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;While CurNum&lt;=MaxCharNum<BR>&nbsp;&nbsp;&nbsp;//随机抽取<BR>&nbsp;&nbsp;&nbsp;CurIndex=Random(1,MaxCharNum)<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;//以下代码保证字母抽取不重复<BR>&nbsp;&nbsp;&nbsp;If EnglishCharArray[CurIndex].using=False Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;EnglishCharArray[CurIndex].using=True<BR>&nbsp;&nbsp;&nbsp;&nbsp;CurIndexArray[CurNum]=CurIndex<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;CurNum=CurNum+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;Trace("CurIndexArray["+CurNum+"]:"+EnglishCharArray[CurIndex].name+"---CurIndex:"+CurIndex)<BR>&nbsp;&nbsp;&nbsp;End If<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;End While<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;//初始化精灵<BR>&nbsp;&nbsp;Var count As Int<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;For count=1 To MaxCharNum<BR>&nbsp;&nbsp;&nbsp;LoadSprite("char"+count,"snurkel-a-z.gif")<BR>&nbsp;&nbsp;&nbsp;SetSpriteActiveFrame("char"+count,CurIndexArray[count])<BR>&nbsp;&nbsp;&nbsp;SetSpriteZIndex("char"+count,count)<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;While curPoint[count].x=oldPoint[count].x And curPoint[count].y=oldPoint[count].y<BR>&nbsp;&nbsp;&nbsp;&nbsp;curPoint[count].x=Random(0,ScreenWidth() - 20)<BR>&nbsp;&nbsp;&nbsp;&nbsp;curPoint[count].y=Random(0,ScreenHeight() - 20)<BR>&nbsp;&nbsp;&nbsp;End While<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;MoveSpriteToPoint("char"+count,curPoint[count].x,curPoint[count].y)<BR>&nbsp;&nbsp;&nbsp;ShowSprite("char"+count)<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;oldPoint[count].x=curPoint[count].x<BR>&nbsp;&nbsp;&nbsp;oldPoint[count].y=curPoint[count].y<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;xPoint[count].x=Random( -10, 10 )<BR>&nbsp;&nbsp;&nbsp;xPoint[count].y=Random( -10, 10 )</P>
<P><BR>&nbsp;&nbsp;&nbsp;Trace("x:"+xPoint[count].x+"&nbsp; y:"+xPoint[count].y)<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;Next<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;While GameOver=False<BR>&nbsp;&nbsp;&nbsp;Trace("animate!")<BR>&nbsp;&nbsp;&nbsp;Animate()<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;Trace("HandleKeys!")<BR>&nbsp;&nbsp;&nbsp;HandleKeys()<BR>&nbsp;&nbsp;End While<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Alert("Game Over!","hehe")<BR>&nbsp;&nbsp;<BR>&nbsp;End Method</P>
<P>&nbsp;Method Animate()<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;BeginFrame()<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Var i As Int<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;For i=1 To MaxCharNum<BR>&nbsp;&nbsp;&nbsp;If curPoint[i].x&lt;0 Or curPoint[i].x&gt;(ScreenWidth()- GetSpriteWidth("char"+i)) Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;xPoint[i].x=xPoint[i].x*-1<BR>&nbsp;&nbsp;&nbsp;End If<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;If curPoint[i].y&lt;0 Or curPoint[i].y&gt;(ScreenHeight()- GetSpriteHeight("char"+i)) Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;xPoint[i].y=xPoint[i].y*-1<BR>&nbsp;&nbsp;&nbsp;End If<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;curPoint[i].x=curPoint[i].x+xPoint[i].x<BR>&nbsp;&nbsp;&nbsp;curPoint[i].y=curPoint[i].y+xPoint[i].y<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;MoveSpriteToPoint("char"+i,curPoint[i].x,curPoint[i].y)<BR>&nbsp;&nbsp;&nbsp;Trace("x:"+xPoint[i].x+"&nbsp; y:"+xPoint[i].y)<BR>&nbsp;&nbsp;Next<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;RefreshScreen()<BR>&nbsp;End Method<BR>&nbsp;<BR>&nbsp;Method HandleKeys()<BR>&nbsp;&nbsp;Var key As String=GetKey()<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Trace("key:"+key)<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Var i As Int<BR>&nbsp;&nbsp;Var num As Int<BR>&nbsp;&nbsp;Var explodecount As Int<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;For i=1 To MaxCharNum<BR>&nbsp;&nbsp;&nbsp;If key=EnglishCharArray[CurIndexArray[i]].name And EnglishCharArray[CurIndexArray[i]].living=False Then<BR>&nbsp;//&nbsp;&nbsp;&nbsp;PlaySound( "Explosion1.wav" )<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;LoadSprite( "ExplodePlayer", "Explosion.gif" )<BR>&nbsp;&nbsp;&nbsp;&nbsp;MoveSpriteToPoint( "ExplodePlayer", GetSpriteLeft( "char"+i ), GetSpriteTop( "char"+i ) )<BR>&nbsp;&nbsp;&nbsp;&nbsp;SetSpriteZIndex( "ExplodePlayer", 5000 )<BR>&nbsp;&nbsp;&nbsp;&nbsp;ShowSprite( "ExplodePlayer" )<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;HideSprite( "char"+i )<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;For num = 1 To GetSpriteFrameCount( "ExplodePlayer" )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SetSpriteActiveFrame( "ExplodePlayer", num )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RefreshScreen()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Delay( 10 )<BR>&nbsp;&nbsp;&nbsp;&nbsp;Next <BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;UnloadSprite( "ExplodePlayer" )&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;EnglishCharArray[CurIndexArray[i]].living=True<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;explodecount=explodecount+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;If explodecount=MaxCharNum Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GameOver=True<BR>&nbsp;&nbsp;&nbsp;&nbsp;End If<BR>&nbsp;&nbsp;&nbsp;End If</P>
<P>&nbsp;&nbsp;Next</P>
<P>&nbsp;End Method<BR>End Program</P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=6698' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=6698</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[一步一步学KPL【8】：如何让字母精灵在屏幕的范围内自由碰撞，边界如何处理？]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=6697</link>
<author>KPLer</author>
<pubDate>Sun, 19 Aug 2007 16:06:00 +0800</pubDate>
<description><![CDATA[<P>在学习中，有一个基本的技巧就是：你并不需要所有的代码都自己写。你可以模仿现成的代码，也可以直接照搬过来。</P>
<P>我们今天写的字母精灵的自由碰撞的代码，就出自KPL本身的一些例程，非常简单。</P>
<P>我们在程序开始时定义了一个游戏结束的标志变量：</P>
<P>&nbsp;&nbsp;Var GameOver As Bool=False</P>
<P>表示游戏未结束。</P>
<P>然后在Main方法的后面，添加如下代码:</P>
<P>&nbsp;&nbsp;While GameOver=False<BR>&nbsp;&nbsp;&nbsp;Trace("animate!")<BR>&nbsp;&nbsp;&nbsp;Animate()<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;Trace("HandleKeys!")<BR>&nbsp;&nbsp;End While</P>
<P>该代码是游戏处理的主要循环部分，包含了一个让字母精灵在屏幕范围内自由碰撞的处理：</P>
<P>&nbsp;Method Animate()<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;BeginFrame()<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Var i As Int<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;For i=1 To MaxCharNum<BR>&nbsp;&nbsp;&nbsp;If curPoint[i].x&lt;0 Or curPoint[i].x&gt;(ScreenWidth()- GetSpriteWidth("char"+i)) Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;xPoint[i].x=xPoint[i].x*-1<BR>&nbsp;&nbsp;&nbsp;End If<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;If curPoint[i].y&lt;0 Or curPoint[i].y&gt;(ScreenHeight()- GetSpriteHeight("char"+i)) Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;xPoint[i].y=xPoint[i].y*-1<BR>&nbsp;&nbsp;&nbsp;End If<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;curPoint[i].x=curPoint[i].x+xPoint[i].x<BR>&nbsp;&nbsp;&nbsp;curPoint[i].y=curPoint[i].y+xPoint[i].y<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;MoveSpriteToPoint("char"+i,curPoint[i].x,curPoint[i].y)<BR>&nbsp;&nbsp;&nbsp;Trace("x:"+xPoint[i].x+"&nbsp; y:"+xPoint[i].y)<BR>&nbsp;&nbsp;Next<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;RefreshScreen()<BR>&nbsp;End Method</P>
<P>在Animate方法内部的循环是精灵的边界处理。</P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=6697' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=6697</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[一步一步学KPL【7】：如何在屏幕上随机显示字母精灵？]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=6696</link>
<author>KPLer</author>
<pubDate>Sun, 19 Aug 2007 15:49:00 +0800</pubDate>
<description><![CDATA[<P>接下来的工作，是要准备精灵图片。</P>
<P>我们写下如下的代码：</P>
<P>&nbsp;&nbsp;For count=1 To MaxCharNum<BR>&nbsp;&nbsp;&nbsp;LoadSprite("char"+count,"snurkel-a-z.gif")<BR>&nbsp;&nbsp;&nbsp;SetSpriteActiveFrame("char"+count,CurIndexArray[count])<BR>&nbsp;&nbsp;&nbsp;SetSpriteZIndex("char"+count,count)<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;While curPoint[count].x=oldPoint[count].x And curPoint[count].y=oldPoint[count].y<BR>&nbsp;&nbsp;&nbsp;&nbsp;curPoint[count].x=Random(0,ScreenWidth() - 20)<BR>&nbsp;&nbsp;&nbsp;&nbsp;curPoint[count].y=Random(0,ScreenHeight() - 20)<BR>&nbsp;&nbsp;&nbsp;End While<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;MoveSpriteToPoint("char"+count,curPoint[count].x,curPoint[count].y)<BR>&nbsp;&nbsp;&nbsp;ShowSprite("char"+count)<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;oldPoint[count].x=curPoint[count].x<BR>&nbsp;&nbsp;&nbsp;oldPoint[count].y=curPoint[count].y<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;xPoint[count].x=Random( -10, 10 )<BR>&nbsp;&nbsp;&nbsp;xPoint[count].y=Random( -10, 10 )</P>
<P><BR>&nbsp;&nbsp;&nbsp;Trace("x:"+xPoint[count].x+"&nbsp; y:"+xPoint[count].y)<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;Next</P>
<P>我们解释一些上面的代码。</P>
<P>在循环的内部，我们首先从图片中定位相应字母的图片：</P>
<P>&nbsp;&nbsp;&nbsp;LoadSprite("char"+count,"snurkel-a-z.gif")<BR>&nbsp;&nbsp;&nbsp;SetSpriteActiveFrame("char"+count,CurIndexArray[count])<BR>&nbsp;&nbsp;&nbsp;SetSpriteZIndex("char"+count,count)</P>
<P>为了记录和保存精灵在屏幕上的位置，我们在程序开头定义了一个关于点的数据结构：</P>
<P>&nbsp;//屏幕上的点的数据结构<BR>&nbsp;Structure Point<BR>&nbsp;&nbsp;x As Decimal<BR>&nbsp;&nbsp;y As Decimal<BR>&nbsp;End Structure</P>
<P>然后申明了三个关于点的变量数组：</P>
<P>&nbsp;Var oldPoint As Point[MaxCharNum]&nbsp; &nbsp;//用于保存图片移动前的位置<BR>&nbsp;Var curPoint As Point[MaxCharNum]&nbsp;//用于保存图片的当前位置<BR>&nbsp;Var xPoint As Point[MaxCharNum]&nbsp;&nbsp;//用于保存图片移动的偏移量</P>
<P>接着往下看代码，还是回到刚才的循环代码内：</P>
<P>&nbsp;&nbsp;&nbsp;While curPoint[count].x=oldPoint[count].x And curPoint[count].y=oldPoint[count].y<BR>&nbsp;&nbsp;&nbsp;&nbsp;curPoint[count].x=Random(0,ScreenWidth() - 20)<BR>&nbsp;&nbsp;&nbsp;&nbsp;curPoint[count].y=Random(0,ScreenHeight() - 20)<BR>&nbsp;&nbsp;&nbsp;End While</P>
<P>这段代码的含义就是：随机产生图片的显示位置，如果该位置和刚才的位置相同，则重新产生新位置。这样避免了图片重叠。</P>
<P>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;MoveSpriteToPoint("char"+count,curPoint[count].x,curPoint[count].y)<BR>&nbsp;&nbsp;&nbsp;ShowSprite("char"+count)<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;oldPoint[count].x=curPoint[count].x<BR>&nbsp;&nbsp;&nbsp;oldPoint[count].y=curPoint[count].y<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;xPoint[count].x=Random( -10, 10 )<BR>&nbsp;&nbsp;&nbsp;xPoint[count].y=Random( -10, 10 )</P>
<P>同样：移动精灵，显示精灵，保存图片位置，产生随机移动偏移量。为下步随机移动精灵做好准备。</P>
<P>这一节很简单，到此为止，全部的代码如下：</P>
<P>Program Demo</P>
<P>&nbsp;//自定义数据结构<BR>&nbsp;Structure EnglishChar<BR>&nbsp;&nbsp;index As Int&nbsp;&nbsp;//序号<BR>&nbsp;&nbsp;name As String&nbsp;&nbsp;//字母<BR>&nbsp;&nbsp;using As Bool&nbsp;&nbsp;//是否已被使用<BR>&nbsp;End Structure<BR>&nbsp;<BR>&nbsp;//屏幕上的点的数据结构<BR>&nbsp;Structure Point<BR>&nbsp;&nbsp;x As Decimal<BR>&nbsp;&nbsp;y As Decimal<BR>&nbsp;End Structure</P>
<P><BR>&nbsp;&nbsp;<BR>&nbsp;//最大字母数<BR>&nbsp;Var MaxCharNum As Int=26<BR>&nbsp;<BR>&nbsp;<BR>&nbsp;Var oldPoint As Point[MaxCharNum]&nbsp; &nbsp;//用于保存图片移动前的位置<BR>&nbsp;Var curPoint As Point[MaxCharNum]&nbsp;//用于保存图片的当前位置<BR>&nbsp;Var xPoint As Point[MaxCharNum]&nbsp;&nbsp;//用于保存图片移动的偏移量<BR>&nbsp;<BR>&nbsp;Method Main()</P>
<P>&nbsp;&nbsp;// 初始化26个英文字母<BR>&nbsp;&nbsp;//Var CharArray As String[]={"a","b","c"}<BR>&nbsp;&nbsp;Var EnglishCharStr As String="a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z"<BR>&nbsp;&nbsp;Var CharArray As String[]=Split(EnglishCharStr,",")<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;//初始化字母数组<BR>&nbsp;&nbsp;Var EnglishCharArray As EnglishChar[MaxCharNum]&nbsp;&nbsp;<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Var CharNum As Int<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;For CharNum=1 To MaxCharNum<BR>&nbsp;&nbsp;&nbsp;EnglishCharArray[CharNum].index=CharNum<BR>&nbsp;&nbsp;&nbsp;EnglishCharArray[CharNum].name=CharArray[CharNum]<BR>&nbsp;&nbsp;&nbsp;EnglishCharArray[CharNum].using=False<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;//调试语句<BR>&nbsp;&nbsp;&nbsp;Trace("indx:"+EnglishCharArray[CharNum].index)<BR>&nbsp;&nbsp;&nbsp;Trace("name:"+EnglishCharArray[CharNum].name)<BR>&nbsp;&nbsp;&nbsp;Trace("using:"+EnglishCharArray[CharNum].using)&nbsp;<BR>&nbsp;&nbsp;&nbsp;Trace("---------------------------------------")<BR>&nbsp;&nbsp;Next<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;//保存随机字母顺序的数组<BR>&nbsp;&nbsp;Var CurIndexArray As Int[MaxCharNum]<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Var CurNum As Int=1<BR>&nbsp;&nbsp;Var CurIndex As Int<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;While CurNum&lt;=MaxCharNum<BR>&nbsp;&nbsp;&nbsp;//随机抽取<BR>&nbsp;&nbsp;&nbsp;CurIndex=Random(1,MaxCharNum)<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;//以下代码保证字母抽取不重复<BR>&nbsp;&nbsp;&nbsp;If EnglishCharArray[CurIndex].using=False Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;EnglishCharArray[CurIndex].using=True<BR>&nbsp;&nbsp;&nbsp;&nbsp;CurIndexArray[CurNum]=CurIndex<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;CurNum=CurNum+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;Trace("CurIndexArray["+CurNum+"]:"+EnglishCharArray[CurIndex].name+"---CurIndex:"+CurIndex)<BR>&nbsp;&nbsp;&nbsp;End If<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;End While<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;//初始化精灵<BR>&nbsp;&nbsp;Var count As Int<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;For count=1 To MaxCharNum<BR>&nbsp;&nbsp;&nbsp;LoadSprite("char"+count,"snurkel-a-z.gif")<BR>&nbsp;&nbsp;&nbsp;SetSpriteActiveFrame("char"+count,CurIndexArray[count])<BR>&nbsp;&nbsp;&nbsp;SetSpriteZIndex("char"+count,count)<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;While curPoint[count].x=oldPoint[count].x And curPoint[count].y=oldPoint[count].y<BR>&nbsp;&nbsp;&nbsp;&nbsp;curPoint[count].x=Random(0,ScreenWidth() - 20)<BR>&nbsp;&nbsp;&nbsp;&nbsp;curPoint[count].y=Random(0,ScreenHeight() - 20)<BR>&nbsp;&nbsp;&nbsp;End While<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;MoveSpriteToPoint("char"+count,curPoint[count].x,curPoint[count].y)<BR>&nbsp;&nbsp;&nbsp;ShowSprite("char"+count)<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;oldPoint[count].x=curPoint[count].x<BR>&nbsp;&nbsp;&nbsp;oldPoint[count].y=curPoint[count].y<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;xPoint[count].x=Random( -10, 10 )<BR>&nbsp;&nbsp;&nbsp;xPoint[count].y=Random( -10, 10 )</P>
<P><BR>&nbsp;&nbsp;&nbsp;Trace("x:"+xPoint[count].x+"&nbsp; y:"+xPoint[count].y)<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;Next&nbsp;&nbsp;<BR>&nbsp;&nbsp;<BR>&nbsp;End Method</P>
<P>End Program</P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=6696' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=6696</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[一步一步学KPL【6】：如何随机产生不重复的26个英文字母？]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=6475</link>
<author>KPLer</author>
<pubDate>Tue, 07 Aug 2007 22:20:00 +0800</pubDate>
<description><![CDATA[
<P>&nbsp;上次我们演示了如何随机产生26个英文字母。现在我们来解决一个遗留问题：如何使产生的字母不重复。</P>
<P>&nbsp;我们需要找到一个办法，来表明产生了的字母已经被使用。</P>
<P>&nbsp;这样，跟字母的相关属性，我们就有了两个要求：一是要知道字母是什么，二是要知道该字母是否已经使用。说不定以后，我们还有一些跟字母相关的属性需要增加。</P>
<P>&nbsp;在这些属性中，有些属性是用于显示的，有些是用于判断的。但他们都是一组相关的属性集合。</P>
<P>&nbsp;所以，我们可以用自定义数据类型的方式，使它们看起来象是一体的。</P>
<P><BR>&nbsp;因此，我们首先新增一个自定义函数在程序的开始部分：</P>
<P>&nbsp;//自定义数据结构<BR>&nbsp;Structure EnglishChar<BR>&nbsp;&nbsp;index As Int&nbsp;&nbsp;//序号<BR>&nbsp;&nbsp;name As String&nbsp;&nbsp;//字母<BR>&nbsp;&nbsp;using As Bool&nbsp;&nbsp;//是否已被使用<BR>&nbsp;End Structure</P>
<P>&nbsp;如果是这样的话，我们上次的代码就要做一些调整：我们要声明新的变量，该变量使用我们自定义的数据类型。</P>
<P>&nbsp;下面的代码保留：</P>
<P>&nbsp;&nbsp;// 初始化26个英文字母<BR>&nbsp;&nbsp;//Var CharArray As String[]={"a","b","c"}<BR>&nbsp;&nbsp;Var EnglishCharStr As String="a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z"<BR>&nbsp;&nbsp;Var CharArray As String[]=Split(EnglishCharStr,",")</P>
<P>&nbsp;然后，我们申明新的变量：</P>
<P>&nbsp;Var EnglishCharArray As EnglishChar[MaxCharNum]</P>
<P>&nbsp;为了便于整个程序范围内都可以访问，我们把MaxCharNum放在了程序的函数或方法外。</P>
<P>&nbsp;Var MaxCharNum As Int=26</P>
<P>&nbsp;接下来，我们初始化新的变量数组：</P>
<P>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;For CharNum=1 To MaxCharNum<BR>&nbsp;&nbsp;&nbsp;EnglishCharArray[CharNum].index=CharNum<BR>&nbsp;&nbsp;&nbsp;EnglishCharArray[CharNum].name=CharArray[CharNum]<BR>&nbsp;&nbsp;&nbsp;EnglishCharArray[CharNum].using=False<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;//调试语句<BR>&nbsp;&nbsp;&nbsp;Trace("indx:"+EnglishCharArray[CharNum].index)<BR>&nbsp;&nbsp;&nbsp;Trace("name:"+EnglishCharArray[CharNum].name)<BR>&nbsp;&nbsp;&nbsp;Trace("using:"+EnglishCharArray[CharNum].using)&nbsp;<BR>&nbsp;&nbsp;&nbsp;Trace("---------------------------------------")<BR>&nbsp;&nbsp;Next&nbsp;</P>
<P>&nbsp;请大家仔细看看循环内的前三条代码，是如何访问字母数组的各个属性的。</P>
<P><BR>&nbsp;有了.using标志，我们就可以在原来随机选取的基础上判断：</P>
<P>&nbsp;&nbsp;//保存随机字母顺序的数组<BR>&nbsp;&nbsp;Var CurIndexArray As Int[MaxCharNum]<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Var CurNum As Int=1<BR>&nbsp;&nbsp;Var CurIndex As Int<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;While CurNum&lt;=MaxCharNum<BR>&nbsp;&nbsp;&nbsp;//随机抽取<BR>&nbsp;&nbsp;&nbsp;CurIndex=Random(1,MaxCharNum)<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;//以下代码保证字母抽取不重复<BR>&nbsp;&nbsp;&nbsp;If EnglishCharArray[CurIndex].using=False Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;EnglishCharArray[CurIndex].using=True<BR>&nbsp;&nbsp;&nbsp;&nbsp;CurIndexArray[CurNum]=CurIndex<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;CurNum=CurNum+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;Trace("CurIndexArray["+CurNum+"]:"+EnglishCharArray[CurIndex].name+"---CurIndex:"+CurIndex)<BR>&nbsp;&nbsp;&nbsp;End If<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;End While</P>
<P><BR>&nbsp;在上面的代码中，大家要注意循环的方法由原来的for循环，变成了while循环。从这个例子，可以看出两者使用的不同：</P>
<P>&nbsp;【1】当循环的次数是确定的，两种循环都可以用；</P>
<P>&nbsp;【2】当已知一种边界条件，而不知要循环多少次的时候，使用while循环；</P>
<P><BR>&nbsp;通过上面的代码调整，我们已经可以不重复地抽取26个英文字母了。</P>
<P><BR>&nbsp;一些题外话，在程序中，要合理地使用循环，如果循环用错，可能程序一直执行不完。其次，循环在程序中，一般是比较耗时的。所以，减少循环次数，也是优化程序效率的一种方法。</P>
<P>&nbsp;循环对编程语言的设计者也是挑战，现在的计算机已经进入了多核时代，如何用简单的方法编程，而编译器就可以用多个CPU进行并行运算，从而充分利用好表现优异的硬件。</P>
<P>&nbsp;可以想像，总有一天，我们每个人都可能拥有现在不可想像的超级计算的能力。我不知道，那时的编程会成为什么样子，但相信这一天一定会在不远的将来就会来到。让我们拭目以待。</P>
<P>附本节代码：</P>
<P>Program Demo</P>
<P>&nbsp;//自定义数据结构<BR>&nbsp;Structure EnglishChar<BR>&nbsp;&nbsp;index As Int&nbsp;&nbsp;//序号<BR>&nbsp;&nbsp;name As String&nbsp;&nbsp;//字母<BR>&nbsp;&nbsp;using As Bool&nbsp;&nbsp;//是否已被使用<BR>&nbsp;End Structure</P>
<P>&nbsp;//最大字母数<BR>&nbsp;Var MaxCharNum As Int=26<BR>&nbsp;<BR>&nbsp;Method Main()</P>
<P>&nbsp;&nbsp;// 初始化26个英文字母<BR>&nbsp;&nbsp;//Var CharArray As String[]={"a","b","c"}<BR>&nbsp;&nbsp;Var EnglishCharStr As String="a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z"<BR>&nbsp;&nbsp;Var CharArray As String[]=Split(EnglishCharStr,",")<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;//初始化字母数组<BR>&nbsp;&nbsp;Var EnglishCharArray As EnglishChar[MaxCharNum]&nbsp;&nbsp;<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Var CharNum As Int<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;For CharNum=1 To MaxCharNum<BR>&nbsp;&nbsp;&nbsp;EnglishCharArray[CharNum].index=CharNum<BR>&nbsp;&nbsp;&nbsp;EnglishCharArray[CharNum].name=CharArray[CharNum]<BR>&nbsp;&nbsp;&nbsp;EnglishCharArray[CharNum].using=False<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;//调试语句<BR>&nbsp;&nbsp;&nbsp;Trace("indx:"+EnglishCharArray[CharNum].index)<BR>&nbsp;&nbsp;&nbsp;Trace("name:"+EnglishCharArray[CharNum].name)<BR>&nbsp;&nbsp;&nbsp;Trace("using:"+EnglishCharArray[CharNum].using)&nbsp;<BR>&nbsp;&nbsp;&nbsp;Trace("---------------------------------------")<BR>&nbsp;&nbsp;Next<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;//保存随机字母顺序的数组<BR>&nbsp;&nbsp;Var CurIndexArray As Int[MaxCharNum]<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Var CurNum As Int=1<BR>&nbsp;&nbsp;Var CurIndex As Int<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;While CurNum&lt;=MaxCharNum<BR>&nbsp;&nbsp;&nbsp;//随机抽取<BR>&nbsp;&nbsp;&nbsp;CurIndex=Random(1,MaxCharNum)<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;//以下代码保证字母抽取不重复<BR>&nbsp;&nbsp;&nbsp;If EnglishCharArray[CurIndex].using=False Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;EnglishCharArray[CurIndex].using=True<BR>&nbsp;&nbsp;&nbsp;&nbsp;CurIndexArray[CurNum]=CurIndex<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;CurNum=CurNum+1<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;Trace("CurIndexArray["+CurNum+"]:"+EnglishCharArray[CurIndex].name+"---CurIndex:"+CurIndex)<BR>&nbsp;&nbsp;&nbsp;End If<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;End While<BR>&nbsp;&nbsp;<BR>&nbsp;End Method</P>
<P>End Program</P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=6475' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=6475</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[一步一步学KPL【5】：如何随机产生26个英文字母？]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5944</link>
<author>KPLer</author>
<pubDate>Sat, 28 Jul 2007 17:33:00 +0800</pubDate>
<description><![CDATA[
<P>&nbsp;如何随机产生26个英文字母？</P>
<P><BR>&nbsp;回忆一下我们平时是怎么掷骰子的：假如我们有分别写有26个字母的骰子，从a到z，按顺序装在一个筒里，晃动，然后，我们会发现，出来的顺序跟进去的时候不一样。</P>
<P>&nbsp;掷骰子的步骤中有两点很重要：</P>
<P>&nbsp;【1】你得有分别写有26个字母的骰子；</P>
<P>&nbsp;【2】你得晃动，没有晃动，就不能打乱原先骰子的顺序；</P>
<P><BR>&nbsp;电脑中的随机产生数和字母的原理，跟上面是完全一样的：</P>
<P>&nbsp;【1】你得要选取的东西存放或标识在某个变量或数组里面；</P>
<P>&nbsp;【2】使用系统提供的随机函数，产生随机数。这个随机函数，就相当于现实中的“晃动”。</P>
<P><BR>&nbsp;所以，如何随机产生26个英文字母的方法就很容易了：</P>
<P>&nbsp;【1】把26个英文自己放置在一个数组里；</P>
<P>&nbsp;【2】使用KPL的随机函数生成器，在1和26间产生随机数；</P>
<P>&nbsp;这里有几个问题需要大家推敲和考虑：</P>
<P>&nbsp;【1】可以分别命名26个变量，然后，保存26个字母吗？</P>
<P>&nbsp;在这里是最糟糕的选择，一是因为分别命名，非常麻烦，二是要检索26个字母是第几个字母非常麻烦。</P>
<P>&nbsp;而数组是这样一个好东西：它存放相同数据类型的数据，而且可以通过下标来定位变量的值。比如说如果我们按顺序存放，我们就知道num[1]里面放的是a，num[26]里面是z。数组括号内的数字就是下标。相当于我们说的索引值。跟我们住的楼房的单元房间编号一个道理：你只需要记住301和302，而不去想到底里面住的是张三还是李四。</P>
<P>&nbsp;用数组保存字母，还有一个重要的原因，是因为KPL的随机数产生函数Random，只能提供在数之间的随机生成。既然如此，那么也就是说，可以随机产生的其实是数组的下标。</P>
<P>&nbsp;所以，用数组是最优的方式，也是唯一的一种选择。</P>
<P><BR>&nbsp;我们说太多了，还是来从代码来看看吧：</P>
<P>Program Demo</P>
<P>&nbsp;Method Main()</P>
<P>&nbsp;&nbsp;// Enter your program code here<BR>&nbsp;&nbsp;Var CharArray As String[]={"a","b","c"}<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Var num As Int<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;For num=1 To ArrayLength(CharArray)<BR>&nbsp;&nbsp;&nbsp;Trace(CharArray[num])<BR>&nbsp;&nbsp;Next <BR>&nbsp;End Method</P>
<P>End Program</P>
<P>&nbsp;我们定义了一个数组CharArray,是字符类型的，然后，我们直接给它赋值。（为了简化，我们只给了3个字母，编码的时候，也可以简化，先验证思路，思路通了，可以很容易修改的。）</P>
<P>&nbsp;数组赋值有很多方法，下面这种是最老实的一种：</P>
<P>&nbsp;var CharArray as String[26]&nbsp;</P>
<P>&nbsp;CharArray[1]="a"<BR>&nbsp;CharArray[2]="b"<BR>&nbsp;CharArray[3]="c"</P>
<P>&nbsp;上面的几句等同于： Var CharArray As String[]={"a","b","c"}</P>
<P>&nbsp;显然，哪个更简单方便，是明摆着的。</P>
<P>&nbsp;字符的赋值还有一种方法，效果是一样的：<BR>&nbsp;<BR>&nbsp;Var EnglishCharStr As String="a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z"<BR>&nbsp;Var CharArray As String[]=Split(EnglishCharStr,",")<BR>&nbsp;<BR>&nbsp;上面的Split方法是非常好用的。它的用途就是根据分割符“，”，把每个分割开的元素，一个一个地放入到相应的数组位置中。简直太方便了！</P>
<P>&nbsp;通过上述三种方法的任意一种，我们都可以把26个英文字母放在一个数组中了。你可以注释掉第一句，分别用其中一句替换，在KPL环境中试试看，是否是跟我们说的一样?</P>
<P>&nbsp;接下来就是做随机抽取的问题了。</P>
<P>&nbsp;我们先在Main外定义一个全局的变量：</P>
<P>&nbsp;//最大字母数<BR>&nbsp;Var MaxCharNum As Int</P>
<P>&nbsp;然后在上述的代码后面，给出以下代码：</P>
<P>&nbsp;&nbsp;MaxCharNum=ArrayLength(CharArray)<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;//保存随机字母顺序的数组<BR>&nbsp;&nbsp;Var CurIndexArray As Int[MaxCharNum]<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Var CurNum As Int<BR>&nbsp;&nbsp;Var CurIndex As Int<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;For CurNum=1 To MaxCharNum<BR>&nbsp;&nbsp;&nbsp;//获得随机位置<BR>&nbsp;&nbsp;&nbsp;CurIndex=Random(1,MaxCharNum)<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;CurIndexArray[CurNum]=CurIndex<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;Trace("CurIndexArray["+CurNum+"]:"+CurindexArray[curNum]+"-"+CharArray[CurIndex])<BR>&nbsp;&nbsp;Next<BR>&nbsp;&nbsp;&nbsp;</P>
<P>&nbsp;我们简单整理一下：我们定义了一个用于保存随机抽取字母顺序的数组CurIndexArray。然后，我们在循环的内部，使用Random，随机产生顺序值，把该值保留下来。我们用了Trace语句来观看随机抽取的效果。</P>
<P>&nbsp;如图所示。</P>
<P><IMG style="BORDER-LEFT-COLOR: #000000; BORDER-BOTTOM-COLOR: #000000; BORDER-TOP-COLOR: #000000; BORDER-RIGHT-COLOR: #000000" src="uploadfile/2007728173450119.jpg" border=0></P>
<P><BR>&nbsp;我们发现了一个问题，虽然是随机抽取了字母，但没有排除重复抽取的情况。</P>
<P>&nbsp;那么我们该如何做，才能使26个字母抽取完全前，做到不重复抽取呢？</P>
<P>&nbsp;这就是我们下一次的练习：如何随机产生不重复的26个英文字母？&nbsp;</P>
<P><BR>&nbsp;本节完整的代码如下：</P>
<P>Program Demo<BR>&nbsp;//最大字母数<BR>&nbsp;Var MaxCharNum As Int<BR>&nbsp;<BR>&nbsp;Method Main()</P>
<P>&nbsp;&nbsp;// 初始化26个英文字母<BR>&nbsp;&nbsp;//Var CharArray As String[]={"a","b","c"}<BR>&nbsp;&nbsp;Var EnglishCharStr As String="a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z"<BR>&nbsp;&nbsp;Var CharArray As String[]=Split(EnglishCharStr,",")<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Var num As Int<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;For num=1 To ArrayLength(CharArray)<BR>&nbsp;&nbsp;&nbsp;Trace(CharArray[num])<BR>&nbsp;&nbsp;Next <BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;MaxCharNum=ArrayLength(CharArray)<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;//保存随机字母顺序的数组<BR>&nbsp;&nbsp;Var CurIndexArray As Int[MaxCharNum]<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Var CurNum As Int<BR>&nbsp;&nbsp;Var CurIndex As Int<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;For CurNum=1 To MaxCharNum<BR>&nbsp;&nbsp;&nbsp;//获得随机位置<BR>&nbsp;&nbsp;&nbsp;CurIndex=Random(1,MaxCharNum)<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;CurIndexArray[CurNum]=CurIndex<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;Trace("CurIndexArray["+CurNum+"]:"+CurindexArray[curNum]+"-"+CharArray[CurIndex])<BR>&nbsp;&nbsp;Next<BR>&nbsp;&nbsp;<BR>&nbsp;End Method</P>
<P>End Program</P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5944' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5944</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[一步一步学KPL【4】：如何编写一个打字练习的游戏？]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5943</link>
<author>KPLer</author>
<pubDate>Sat, 28 Jul 2007 17:31:00 +0800</pubDate>
<description><![CDATA[
<P><STRONG>（一）开始</STRONG></P>
<P>&nbsp;我们从今天开始，做一个系列练习。这个练习结束的时候，我们希望得到一个简单的游戏：当程序运行时，KPL屏幕会最大化，在屏幕上会随机地产生很多英文字母，这些字母象台球一样在屏幕内游荡，当你在键盘上敲击相应的字母时，字母会爆炸消失，当你把所有的字母都敲击完成后，游戏结束。</P>
<P>&nbsp;这个小游戏，跟我们平时的打字练习的游戏有点相似。你通过学习后，很容易根据自己的爱好，扩展出其他的方式。</P>
<P>&nbsp;我们完成这个游戏，主要是展示代码是如何逐步完成。在做这个游戏时，我们会看到需要哪些基本的KPL语法知识，而这些知识又是如何在一起使用的。</P>
<P>&nbsp;在任何学习中，最难的一步，其实不是第一步，而是开始迈入综合应用的时候。我们这个程序就是为了帮助大家迈出这一步，做的一个演示。</P>
<P>&nbsp;如果大家能跟着思路一步一步走的话，一定会有很多收获，在学习中达到事半功倍的效果。</P>
<P>&nbsp;</P>
<P><STRONG>（二）工作思路</STRONG></P>
<P>&nbsp;我们先说说，我们的工作思路：当一个问题比较复杂的时候，你要做的事情，不是一步到位，尤其是当你还不熟悉，技术也不太熟练的时候。你要做的第一件事情，是简化你的工作，把你的工作先缩小范围，降低对技能的要求。直到你遇到一个不得不面对的简单的问题，你才开始去尝试各种方法，重新翻书，去找已经存在的相似的代码，然后，在模仿或者借鉴的过程中，找到自己要的那个部分。唯有这样，你才有可能靠自己取得进展。</P>
<P>&nbsp;所以，我们开始的时候，虽然知道我们最终的结果是上面描述的那个样子，但我们清楚，我们可能一下还达不到那步。我们先把一些问题抛开：比如字母移动，如何按键，如何爆炸。</P>
<P>&nbsp;我们把问题简化为：如何随机产生26个英文字母？</P>
<P>&nbsp;大家想一想：这个是不是整个程序的关键的第一步呢？当然是了，如果不是的话，后面的字母移动，判断，爆炸，就无法做。</P>
<P>&nbsp;因此，简化的过程，其实也是分解步骤的过程，哪些需要先做，哪些需要后做，可以在思考的过程中逐渐清晰起来。</P>
<P>&nbsp;要完成整个KPL的例程，我们分解成这么几个问题：</P>
<P>&nbsp;【1】如何随机产生26个英文字母？</P>
<P>&nbsp;【2】如何随机产生不重复的26个英文字母？</P>
<P>&nbsp;【3】如何把随机产生的字母用对应的图片精灵表示？</P>
<P>&nbsp;【4】如何让字母精灵在屏幕的范围内自由碰撞，边界如何处理？</P>
<P>&nbsp;【5】如何对按键进行处理？如何处理字母精灵的爆炸效果？</P>
<P><BR>&nbsp;这样沿着基本要求走下来，我们要逐步解决的问题就会迎刃而解。</P>
<P>&nbsp;我要告诉大家的是：你并不需要在一开始的时候，对每个步骤，每个细节都构思好，你只要确定好开始的问题后，其他的问题，都可以随之而来。不用太过于担心。</P>
<P>&nbsp;只要你有明确的目的要求，那些障碍和问题是不会逃掉的。</P>
<P><BR>&nbsp;<BR>&nbsp;让我们开始吧！<BR>&nbsp;&nbsp;</P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5943' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5943</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[KPL开发环境中的一个bug]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5815</link>
<author>KPLer</author>
<pubDate>Fri, 27 Jul 2007 09:38:00 +0800</pubDate>
<description><![CDATA[
<P>在KPL开发环境中发现一个系统本身的bug,估计是因为系统设计是英文版的，在中文环境下，对某些字符没有处理过造成的错误。</P>
<P>用来测试错误的例子：</P>
<P>Program Test</P>
<P><BR>&nbsp;Method Main()</P>
<P>&nbsp;&nbsp;// Enter your program code here<BR>&nbsp;&nbsp;Var x As Int=0<BR>&nbsp;&nbsp;Var y As Int=0</P>
<P>&nbsp;&nbsp;Loop 600<BR>&nbsp;&nbsp;&nbsp;x=x+1<BR>&nbsp;&nbsp;&nbsp;MoveTo(x,y)<BR>&nbsp;&nbsp;End Loop</P>
<P>&nbsp;&nbsp;Loop 100<BR>&nbsp;&nbsp;&nbsp;y=y+1<BR>&nbsp;&nbsp;&nbsp;MoveTo(x,y)<BR>&nbsp;&nbsp;End Loop<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Loop 600<BR>&nbsp;&nbsp;&nbsp;x=x-1<BR>&nbsp;&nbsp;&nbsp;MoveTo(x,y)<BR>&nbsp;&nbsp;End Loop<BR>&nbsp;&nbsp;<BR>&nbsp;End Method</P>
<P>End Program</P>
<P>&nbsp;</P>
<P>导致出错的语句是： x=x-1 </P>
<P>出错时的报错信息：</P>
<P><IMG style="BORDER-LEFT-COLOR: #000000; BORDER-BOTTOM-COLOR: #000000; BORDER-TOP-COLOR: #000000; BORDER-RIGHT-COLOR: #000000" src="uploadfile/200772794216347.jpg" border=0></P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>解决办法也很简单：</P>
<P>把 x=x-1 修改成 x=x - 1&nbsp;&nbsp;&nbsp; ,就是在减号后面增加空格。就可以避免上述错误。</P>
<P><IMG style="BORDER-LEFT-COLOR: #000000; BORDER-BOTTOM-COLOR: #000000; BORDER-TOP-COLOR: #000000; BORDER-RIGHT-COLOR: #000000" src="uploadfile/200772794349535.jpg" border=0></P>
<P>&nbsp;</P>
<P>希望大家今后遇到该类问题，可以很快绕过。</P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5815' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5815</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[一步一步学KPL【3】：如何调试KPL程序？]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5419</link>
<author>KPLer</author>
<pubDate>Mon, 23 Jul 2007 15:07:00 +0800</pubDate>
<description><![CDATA[
<P>&nbsp;第一个问题：什么是调试？</P>
<P>&nbsp;这里面有个典故。我从网上搜的一个经典的说法，放在下面：</P>
<P>&nbsp;1937年，美国青年霍德华.艾肯找到IBM公司为其投资200万美圆研制计算机，第一台成品艾肯把它取名为：马克1号，又叫“自动序列受控计算机”，从这时起IBM公司由生产制表机，肉铺磅秤，咖啡研磨机等乱七八糟玩意儿的行业，正式跨进“计算机”领地。<BR>&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;为马克1号编制程序的是一位女数学家雷斯.霍波，有一天，她在调试程序时出现故障，拆开继电器后，发现有只飞蛾被夹扁在触点中间，从而“卡”住了机器的运行。于是，霍波诙谐的把程序故障统称为“臭虫（BUG）“，把排除程序故障叫DEBUG（捉虫子），而这奇怪的”称呼“，竟成为后来计算机领域的专业行话。</P>
<P>&nbsp;我们重复一下：调试（debug）就是排出程序故障。</P>
<P>&nbsp;刚学电脑编程的人，都会以为程序代码是通过精确构思，一气呵成的，其实，电脑编程跟写文章，做其他的工作完全一样。总是在大的构思下，通过修修补补完成的。</P>
<P>&nbsp;刚开始，哪怕输入错一个关键字符，都有可能导致程序出错。找出程序出错的过程，就叫调试。</P>
<P>&nbsp;编写任何程序都需要调试语句或工具。在KPL里面提供了一些简单的调试语句，如Trace、ShowTrace和Stop等。</P>
<P>&nbsp;私下里说：KPL的调试工具是相当的弱智，跟商业的调试工具不能相比。但因为我们要编写的代码，也不算复杂。所以，我们还是可以克服这个弱点，继续前进的。</P>
<P>&nbsp;既然调试就是排错，那么，换句话说就是要定位出错的位置。<STRONG>我们该如何做呢？</STRONG></P>
<P>&nbsp;我来告诉大家我是如何做的。</P>
<P>【1】我在阅读一段新的代码或定位错误的时候，我会用到注释语句。大家想想为什么这样？</P>
<P>&nbsp;因为我们知道，注释语句后，代码不会被执行。这样，我就把大的程序化整为零了。</P>
<P>&nbsp;我先把代码后面的部分注释掉 ，让程序一段一段地执行。</P>
<P>&nbsp;有人说了，如果要注释的语句很多，不是很麻烦？</P>
<P>&nbsp;不麻烦，因为在KPL开发环境的工具栏上有两个个工具：一个注释工具，一个取消注释的工具。</P>
<P>&nbsp;你可以在代码窗口选中要注释或取消注释的代码块。</P>
<P><IMG style="BORDER-LEFT-COLOR: #000000; BORDER-BOTTOM-COLOR: #000000; BORDER-TOP-COLOR: #000000; BORDER-RIGHT-COLOR: #000000" src="uploadfile/20077231592593.jpg" border=0></P>
<P>&nbsp;这样是不是很方便了呢？</P>
<P>&nbsp;接下来的问题是：我把后面的代码都注释了，我想了解当前已执行的代码的变量的结果，如何获知呢?</P>
<P>【2】这时，Trace语句该上场了。我们来看一个例子：</P>
<P>&nbsp;var i as int<BR>&nbsp;var total as int</P>
<P>&nbsp;for i=1 to 10<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;total=total+i<BR>&nbsp;&nbsp;Trace("Total:"+total)<BR>&nbsp;next</P>
<P>&nbsp;循环内的Trace语句是我们为了看见，在每次循环过程中的累加结果，增加的一条语句。</P>
<P>&nbsp;这样，原来看不见的循环结果，通过简单的结果显示语句就可以“看见”了。这个结果，不会显示在KPL程序的界面上，而是显示在KPL的开发环境的Messages消息框内。这就是KPL的调试，其实很简单！</P>
<P><IMG style="BORDER-LEFT-COLOR: #000000; BORDER-BOTTOM-COLOR: #000000; BORDER-TOP-COLOR: #000000; BORDER-RIGHT-COLOR: #000000" src="uploadfile/200772315938634.jpg" border=0></P>
<P>&nbsp;同样，我们可以在需要确认和判断的地方，加上类似的代码，帮助我们确认程序出错的位置，或确定程序是否按设计的逻辑和思路进行。</P>
<P>&nbsp;通过上面两个基本方法或工具，我们可以调试所有的KPL程序。</P>
<P>&nbsp;KPL的程序调试给我们还有另外的一种启示：<STRONG>简单的东西，并不等于没有用；好东西，也不代表着完美无缺。更多的时候，我们要自己想办法，绕过一些障碍。</STRONG></P>
<P>&nbsp;我想，这个结论，不仅适应于KPL编程，也适用于其他任何事情。</P>
<P>&nbsp;我相信，大家一旦掌握了这两个工具，学习的信心和能力会大大的增强。<BR>&nbsp;</P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5419' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5419</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[一步一步学KPL[2]：编码的习惯和常识]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5418</link>
<author>KPLer</author>
<pubDate>Mon, 23 Jul 2007 14:12:00 +0800</pubDate>
<description><![CDATA[
<P>&nbsp;这时的我们已经大致了解了KPL，按照KPL入门的例子也输入了个别的例子。我们小心翼翼地不敢确认，难道这样就开始学习编程了？</P>
<P>&nbsp;很小的一步，对新人来说，也是一大步。人们常说：万事开头难。即使是这样，在开头的时候，养成一些好习惯，对以后有很大的帮助。</P>
<P>&nbsp;让我一点一点的来说。</P>
<P><BR>&nbsp;当我们打开KPL编程环境，建立一个新的KPL文件时，系统会自动产生如下的代码：</P>
<P>// All KPL programs start with the word "Program" followed by the<BR>// name of your program, and end with the words "End Program".<BR>Program NewProgram</P>
<P>&nbsp;// This is the starting point of the program, and is 'called'<BR>&nbsp;// by KPL automatically when the program is run.<BR>&nbsp;//<BR>&nbsp;// To expand this method, double-click on the box below or click<BR>&nbsp;// the plus symbol to the left of the words "Method Main()"<BR>&nbsp;Method Main()</P>
<P>&nbsp;&nbsp;// Enter your program code here</P>
<P>&nbsp;End Method</P>
<P>End Program</P>
<P>系统为什么会自动产生这些代码？主要的原因是：系统认为这是所有程序的基本框架，你不用每次输入了。当然了，如果你一定要自己输入当作熟悉或练习，它也不会拦着你。</P>
<P>&nbsp;//这个符号后面的内容表示是注释，也就是说这一行内容是一个提示，给编码的人自己看的，一般用于提醒自个儿，不要在很久以后看到下面的代码的时候，回忆不起以前到底在干嘛。</P>
<P>&nbsp;这个注释的符号在很多编程语言里面都有。注释的部分，在程序运行时，并不被执行，所以，即使是在英文版的系统里面，这里的注释也可以输入中文。</P>
<P>&nbsp;当然，在编码文件的其他地方，KPL目前的版本是不支持中文的。</P>
<P>&nbsp;这样在命名程序名称和变量时，就只能用英文或者拼音，我们来看下面的一个代码：</P>
<P>Program HelloWorld</P>
<P>&nbsp;Method SayHello()<BR>&nbsp;&nbsp;PrintLine ("Hello!")<BR>&nbsp;End Method</P>
<P>&nbsp;Method SaySomething(SomeThing As String)<BR>&nbsp;&nbsp;PrintLine (Something)<BR>&nbsp;End Method</P>
<P>&nbsp;Method Main()</P>
<P>&nbsp;&nbsp;Color ( Blue )<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;SayHello()</P>
<P>&nbsp;&nbsp;Var WhatIWantToSay As String<BR>&nbsp;&nbsp;WhatIWantToSay = "Hello Again!"<BR>&nbsp;&nbsp;SaySomething(WhatIWantToSay)</P>
<P>&nbsp;&nbsp;WhatIWantToSay = "Goodbye!"<BR>&nbsp;&nbsp;SaySomething(WhatIWantToSay)</P>
<P>&nbsp;End Method</P>
<P>End Program</P>
<P>这个例子是KPL提供的示例代码Learning Programs目录下的第一个例子：</P>
<P>LearningProgra001a.kpl。这个版本是没有注释的，因为比较简单。</P>
<P>&nbsp;注释的写法有个简单规则：并不需要每条都写，而是写重要的，或容易忘记的。重要的处理函数和方法，可以写详细一点。</P>
<P>&nbsp;变量命名的规则：用意思明白的词来命名，比如上面的：WhatIWantToSay 就很清楚，只有在不需要表示特别意义的时候，使用单字母变量命名，比如在循环的时候，可以使用 i 来代替 count 变量声明。</P>
<P>&nbsp;变量名可以用英文，也可以用拼音。个人习惯。一般采用首字大写的原则，但这个不是一个必须的规定，只是一个习惯性建议而已。</P>
<P>&nbsp;代码之间可以空行，这样，象写文章可以分段一样。这样使代码看起来结构上更加清晰。</P>
<P>&nbsp;如果把代码密密麻麻一溜排下来，自己阅读和检查起来，也会很累。你们看看上面的例子，是不是看起来很清爽？</P>
<P>&nbsp;同样的道理，保持缩进也是为了保持结构清晰：</P>
<P>&nbsp;&nbsp;For Location = 1 To 300<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Delay(10)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MoveSpriteToPoint( "UFO", Location, Location )&nbsp;&nbsp;<BR>&nbsp;&nbsp;Next</P>
<P>&nbsp;我们一下就看出是一段循环，里面有若干语句。(每缩进一次，只需要按键盘左上Q健旁的Tab键就可以了)</P>
<P>&nbsp;上面说的，是基本的编码习惯，几乎在所有的编程过程中，都会有这样的要求。</P>
<P>这是一种基本的素养。请大家在开始的时候，就适应并达到这种要求！</P>
<P>&nbsp;这样不仅使代码看起来优雅，而且培养了一种严谨的习惯。</P>
<P>&nbsp;接下来，我给大家讲讲，该如何调试程序。</P>
<P>&nbsp;</P>
<P>喷嚏网 -原创 <A href="http://www.dapenti.com/">www.dapenti.com</A>&nbsp; <A href="http://www.dapenti.com/">www.dapenti.com</A></P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5418' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5418</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[structure有什么用？]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5390</link>
<author>KPLer</author>
<pubDate>Sun, 22 Jul 2007 19:25:00 +0800</pubDate>
<description><![CDATA[
<P>今天在KPL qq 群里，回答的几个问题。</P>
<P><STRONG>Q：为什么编程的最开头要写"structure"&nbsp; 有什么用? Main是程序运行起始点<BR>可是为什么MAIN前还能加其他的东西?</STRONG> <BR></P>
<P>A：structure是一种自定义数据类型的方式，主要是为了方便编程访问。</P>
<P>我先说kpl的程序结构，再说structure的用途。</P>
<P>kpl的结构都是这样的：</P>
<P><STRONG>程序框架<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 自定义数据类型</STRONG></P>
<P><STRONG>&nbsp;&nbsp;&nbsp; 定义全局变量</STRONG></P>
<P><STRONG>&nbsp;&nbsp;&nbsp; 程序入口 Main</STRONG></P>
<P><STRONG>&nbsp;&nbsp;&nbsp; 各方法</STRONG></P>
<P><STRONG>&nbsp;&nbsp;&nbsp; 各函数</STRONG></P>
<P><STRONG>程序框架<BR></STRONG></P>
<P>我们在《用设计的方式理解程序语言》解释过structure:<BR><A href="more.asp?name=KPLer&amp;id=4857">more.asp?name=KPLer&amp;id=4857</A> </P>
<P><STRONG>自定义数据结构</STRONG>：信息总是比较多的。而且信息有个特点，它并不总是单独存在。比如，拿我们自己来说吧，跟自己相关的信息很多，姓名、年龄、性别、电话、家庭住址等等。如果我们要表明相关信息，给每个信息设置一个变量，是一个非常麻烦的事情。</P>
<P>程序的设计者考虑到了这一点，通过自定义数据结构来打包访问。</P>
<P>&nbsp;Structure People<BR>&nbsp;&nbsp;name as string<BR>&nbsp;&nbsp;age as int<BR>&nbsp;&nbsp;address as string<BR>&nbsp;end Structure</P>
<P>&nbsp;这样当我们申明一个people类型的变量时，就可以这样使用：</P>
<P>&nbsp;var curuser as People</P>
<P>&nbsp;curuser.name="kpler"<BR>&nbsp;curuser.age=2<BR>&nbsp;curuser.address="<A href="http://www.dapenti.com/">www.dapenti.com</A>"</P>
<P>&nbsp;你看，这样是不是很简单？！</P>
<P>在各个方法和函数里定义的变量为局部变量。在外面定义的为全局变量。全局变量可以在任何地方被改变值，并且可以保留改变。 <BR></P>
<P>在Main外是可以放其他东西的，这个跟代码的执行顺序有关系：</P>
<P>[1]在程序主体定义的东西，其实是最先执行的，先于Main方法；</P>
<P>[2]在主体一般来说，首先是自定义数据结构（如果需要的话），然后是全局变量申明，然后是给变量赋予初始值；</P>
<P>[3]然后程序才从Main开始的。<BR><BR></P>
<P><STRONG>Q:"结构变量里的域项可以用结构变量名,后跟"."字符,再加域变量名访问."是什么意思? <BR></STRONG></P>
<P>A:你可以理解为 ： 下属的 ，比如 mypoint.x 就是 mypoint 下属的 x 坐标 </P>
<P>Q:域项是什么意思?</P>
<P>A:就是包含的项目</P>
<P>Q:结构变量包含的项目? <BR></P>
<P>A:就跟房子一样，一个单元就是一个域，每个房间就是一个域项，一个组成的元素</P>
<P><STRONG>Q:声明变量用VAR可以吗</STRONG> <BR></P>
<P>A: var 和 define 的用途是一样的，这是编写语言的冗余设计.variable 是变量的意思 ，var是前三个字符</P>
<P>Q: </P>
<P>有两段代码<BR>Loop 5<BR>&nbsp;&nbsp;&nbsp; printline("printing")<BR>End loop<BR>还有一段<BR>define x as int=5<BR>Loop x <BR>&nbsp;&nbsp;&nbsp; printline("printing")<BR>End Loop<BR></P>
<P>它们作用上有什么不同 <BR></P>
<P>A:一样的.代码就是这样，可以有很多写法，效果是一样的</P>
<P>第二种写法有一些优势，因为，如果要修改的话，只需要改 x的值，后面x却不会该。这样在代码方面，比较灵活。所以，你看有些程序会在开始时，定义很多变量，然后在程序的主体使用变量代替直接的值。</P>
<P>Q:如果真的改起来很方便呢？</P>
<P>A：如果只使用几次，硬写也无妨。</P>
<P>有一个习惯建议：就是不要写硬编码，比如5，而是可以设一个变量，然后给变量赋值，再使用变量。这样保持程序的灵活性 。</P>
<P><STRONG>Q：布尔表达式怎么写?有格式吗?</STRONG></P>
<P>A：布尔表达式 在 kpl 里面就是指 不等式判断 ： 比如 i&gt;100 or count&lt;100 这些的。有判断小球边界的例子，你可以看看如何用<BR></P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5390' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5390</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[为什么编程要用英文？]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5277</link>
<author>KPLer</author>
<pubDate>Sat, 14 Jul 2007 17:02:00 +0800</pubDate>
<description><![CDATA[
<P>&nbsp;儿子问我：为什么编程要用英文？能不能用中文？</P>
<P>&nbsp;我想，这个问题，也是很多人的问题。</P>
<P>&nbsp;这个问题，可能包括几个方面：</P>
<P>&nbsp;【1】软件的界面，是否可以是中文的？</P>
<P>&nbsp;【2】软件的帮助是否可以是中文的？</P>
<P>&nbsp;【3】写程序的代码是否可以是中文的？</P>
<P><BR>&nbsp;前面两个问题，主要是使用环境和习惯上的问题，比如使用者对英文不熟悉，看着头皮发麻，基本属于心理上的担心。其实，很多软件英文单词都特别的简单，熟悉后就没有认知障碍。</P>
<P>&nbsp;英语作为一种现代社会的核心竞争力，对学生的能力来说，是不可以忽视的。全世界，有大量的知识和信息，都以英文的方式记载，如果你要在第一时间，得到第一手资料，那么，熟悉英文肯定是有很大的优势。</P>
<P>&nbsp;从我自己使用的软件经验来看，我常常发现：英文版的软件在性能和质量上，往往优于本地化的产品。全世界，只有很少的软件巨头，在其遍布世界的产品上，才推出各种语言的相应版本。</P>
<P>&nbsp;软件产品的本地化过程，不仅仅是其界面接口的简单转换，还有当地的使用习惯和文化禁忌需要考虑。并非完全是语言翻译的过程。</P>
<P>&nbsp;我想前面两个问题比较简单。</P>
<P>&nbsp;至于第三个问题，才是更多人要关心或提出质疑的问题：</P>
<P>&nbsp;是否可以用中文来编写程序代码？</P>
<P>&nbsp;对这个问题的回答，需要非常的谨慎。我看见网络上经常讨论这个问题，最后变成了是否爱国，是否要有核心竞争力的讨论了。</P>
<P>&nbsp;我的看法略微有些不同。我认为大家对编码的了解需要一些常识。</P>
<P>&nbsp;是的，程序代码，比如KPL或是c#,看起来是用英文写的，但是，你为什么不把英文只看做是一种记录程序的形式，而非要把它跟另外一种自然语言对立起来呢？</P>
<P>&nbsp;我们从小学习数学的时候，我们记录数字可以使用1234567，我们没有感到任何文化上的压力和被压迫的感觉。虽然我们的中文是这样写的：一二三四五六七。我们在计算的时候，用阿拉伯数字的次数，远远多于用中文的次数。</P>
<P>&nbsp;这说明两个问题：</P>
<P>&nbsp;【1】标准，在科学上是必要的。全世界都可以使用阿拉伯数字计数，因为这个是通用语言，而且方便。</P>
<P>&nbsp;同样，我们可以理解：因为编程的起源和标准，大多跟英文有关。所以选择英文作为编码的关键词和相关形式，也成了一种习惯或标准。</P>
<P>&nbsp;你认为：x=100 还是 爱克斯=100 ，哪个更清楚简单呢？</P>
<P><BR>&nbsp;【2】设计一个用中文编码的语言，是可行的。但是，并不能说一个中文编码的形式就更有竞争力。电脑编程，不是比谁的中文说的更好，也不是比谁更爱国。</P>
<P>&nbsp;电脑编程的语言，是一种工具。任何工具的价值，在于使用。工具总是作为一种解决人们生活或工作的解决方案的一种手段，才有其存在的价值和意义。</P>
<P>&nbsp;价值要跟目标匹配。</P>
<P>&nbsp;我觉得任何语言的选择，首先要匹配用户的价值，无论是中文编码还是英文编码，如果不能帮助用户完成任务的话，用户自然就不会选择它。</P>
<P>&nbsp;所以，从价值判断上，从理论上来说：编码可以是跟语言无关的。</P>
<P>&nbsp;但在现实中，要实现中文编码，在技术上面临的困难也相当的大。这主要跟中文的语言方式有关。</P>
<P>&nbsp;英文编码都是由格式和单词构成，但中文要区分单词，很难。（现在很多中文编程，虽然可以使用中文变量，但关键词还是要使用英文）</P>
<P>&nbsp;我举个例子来说： we love you,中文说： 我们爱你。</P>
<P>&nbsp;英文的每个词之间是有空格的，中文是连着的。在分词上，两种语言的方式是不同的。</P>
<P>&nbsp;这是什么意思呢？</P>
<P>&nbsp;是这样的：电脑编码，其实只是一个简单的逻辑形式。但电脑运行时，其实并不是象我们理解的那样，可以理解我们编写的代码。</P>
<P>&nbsp;当我们编写完代码后，点击运行时，有一个叫做编译器的程序，开始把我们的结构化的代码，转化成一种可以理解的数学形式，其实，它才不管你写什么呢。只要是按照结构写的。它一定可以代码转换成电脑可以运行的低级代码。</P>
<P>&nbsp;在这样的转化中，分析源代码，就需要很好的分词技术。因为英文本身的特点，其分词很容易，而且跟其自然语言使用方式一致。但换成了中文，编程变得很怪异，而且代码转化变得难度很大。</P>
<P>&nbsp;好了，我们不再纠缠这样的细节。我们作为一个使用者来做一个判断，问自己几个问题：</P>
<P>&nbsp;我学习编程的目的何在？&nbsp;为了学习？还是为了利用工具？开发产品？使用的工具可以达到我的要求吗？如何才能选择好适合的工具？</P>
<P>&nbsp;</P>
<P>&nbsp;我说说选择编程工具的两条建议：</P>
<P>&nbsp;【1】不同的用途选择合适的编程语言</P>
<P>&nbsp;不用说，如果要教育刚入门的孩子学编程，我会推荐KPL和visual basic。因为语言设计跟现代语言设计结合紧密，而且，已经被证明是用途广泛、可以顺利过渡的软件编程语言；</P>
<P>&nbsp;在真正的软件企业中，语言的选择是五花八门的。做企业管理软件的，可能选用的是:c#和java。</P>
<P>而互联网企业在脚本语言的使用上，又是别有洞天的。</P>
<P>&nbsp;对语言的选择，关键取决于你干什么。</P>
<P>&nbsp;任何成熟的编程语言都有其长处，也有不合适使用的地方，不要对工具产生迷信。</P>
<P>&nbsp;【2】效率是选择工具的重要依据</P>
<P>&nbsp;所谓的效率，是指是否在满足目标的前提下，程序编写的效率，程序本身运行的效率，还有就是是否使学习保值，个人学习投资的效率也是非常重要的。</P>
<P>&nbsp;如果没有成熟的产品，没有经历过市场检验过的产品。对于初学者，我觉得还是谨慎使用。</P>
<P>&nbsp;在全球化的时代里，要有全球化的眼光。我们要充分利用成熟的技术和产品，真正服务于我们的未来。</P>
<P>&nbsp;我自己的习惯是这样的：安装英文版软件，阅读英文的和中文的帮助手册，在编写代码的时候，编写中文注释。因为我发现，如果英文写不好的话，注释又变成了障碍，阻碍了团队间的交流。看来，我们明白了我们在干什么，需要什么，我们就会选择适合的表达形式：在需要中文的地方使用中文，在需要英文的地方使用英文，如此而已。</P>
<P>编程语言是连接人和机器的桥梁。所以，任何编程语言的设计，都要考虑两个方面：[1]方便机器理解；[2]方便人类使用。</P>
<P><BR>喷嚏网：原创</P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5277' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5277</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[如何用任意的图形来画线？]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5256</link>
<author>KPLer</author>
<pubDate>Fri, 13 Jul 2007 13:15:00 +0800</pubDate>
<description><![CDATA[
<P>这是网友提出的一个问题：画出一条直线或曲线，但这个直线或曲线，不是由平常的点构成，而是用五星、圆形或其他任意图形构成。</P>
<P>我写了一小段代码，给大家做一个演示。</P>
<P>我们先看看最后的效果。</P>
<P><IMG style="BORDER-LEFT-COLOR: #000000; BORDER-BOTTOM-COLOR: #000000; BORDER-TOP-COLOR: #000000; BORDER-RIGHT-COLOR: #000000" src="uploadfile/2007713132013988.jpg" border=0></P>
<P>这段代码画了三条线：</P>
<P>【1】第一条线，是用的最普通的方法；</P>
<P>【2】第二条线，沿着直线路径，画的是圆，看起来象项链一样；</P>
<P>【3】第三条线，是由一个蓝色的小球构成的，代码的基本结构跟第二条线的处理差不多。但是，我使用了KPL中精灵的一些方法：把任意图像设置成精灵，然后设置图形的大小，调用图像复制的方法。这样的话，我可以使用任何图形来沿着路径画画。是一个通用的做法：你可以把小球的图形换成五星或其他任何图形。</P>
<P>你能看明白下面的代码吗？如果有疑问的话，把你的问题发给我们：<A href="mailto:dapenti2006@gmail.com">dapenti2006@gmail.com</A></P>
<P>附：</P>
<P>Program NewPicture</P>
<P>&nbsp;Structure Point<BR>&nbsp;&nbsp;x As Int<BR>&nbsp;&nbsp;y As Int<BR>&nbsp;End Structure</P>
<P>&nbsp;Method Main()</P>
<P>&nbsp;&nbsp;SetDeviceCoordinates()</P>
<P>&nbsp;&nbsp;//DrawLines<BR>&nbsp;&nbsp;Var point1 As Point<BR>&nbsp;&nbsp;Var point2 As Point<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;point1.x=100<BR>&nbsp;&nbsp;point1.y=0<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;point2.x=300<BR>&nbsp;&nbsp;point2.y=200<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;DrawLines(point1,point2)<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;//Drawcircles<BR>&nbsp;&nbsp;point1.x=100<BR>&nbsp;&nbsp;point1.y=100<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;point2.x=300<BR>&nbsp;&nbsp;point2.y=400&nbsp;&nbsp;<BR>&nbsp;&nbsp;DrawCircles(point1,point2)<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;//DrawSprites<BR>&nbsp;&nbsp;point1.x=100<BR>&nbsp;&nbsp;point1.y=200<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;point2.x=300<BR>&nbsp;&nbsp;point2.y=500&nbsp;&nbsp;<BR>&nbsp;&nbsp;DrawSprites(point1,point2)&nbsp;&nbsp;<BR>&nbsp;End Method</P>
<P>&nbsp;Method DrawLines(Start As Point,Pos As Point)<BR>&nbsp;&nbsp;DrawLine(Start.x,Start.y,Pos.x,Pos.y)<BR>&nbsp;End Method<BR>&nbsp;<BR>&nbsp;Method DrawCircles(Start As Point,Pos As Point)<BR>&nbsp;&nbsp;Var IncStep As Int=2<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Var x As Int<BR>&nbsp;&nbsp;Var y As Int<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;x=start.x<BR>&nbsp;&nbsp;y=start.y<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Pen(False)<BR>&nbsp;&nbsp;While x&lt;=Pos.x<BR>&nbsp;&nbsp;&nbsp;MoveTo(x,y)<BR>&nbsp;&nbsp;&nbsp;Circle(IncStep*2,False)<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;x=x+4<BR>&nbsp;&nbsp;&nbsp;y=y+4<BR>&nbsp;&nbsp;End While<BR>&nbsp;&nbsp;<BR>&nbsp;End Method</P>
<P>&nbsp;Method DrawSprites(Start As Point,Pos As Point)<BR>&nbsp;&nbsp;Var IncStep As Int=2<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Var x As Int<BR>&nbsp;&nbsp;Var y As Int<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;x=start.x<BR>&nbsp;&nbsp;y=start.y<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Pen(False)<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;LoadSprite("MySprite","blueball.png")<BR>&nbsp;&nbsp;ScaleSprite("MySprite",0.8)<BR>&nbsp;&nbsp;While x&lt;=Pos.x<BR>&nbsp;&nbsp;&nbsp;MoveSpriteTo("MySprite",x,y)<BR>&nbsp;&nbsp;&nbsp;StampSprite("Mysprite")<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;x=x+8<BR>&nbsp;&nbsp;&nbsp;y=y+8<BR>&nbsp;&nbsp;End While<BR>&nbsp;&nbsp;<BR>&nbsp;End Method<BR>End Program</P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5256' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5256</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[一步一步学KPL[1]：初学者入门]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5191</link>
<author>KPLer</author>
<pubDate>Mon, 09 Jul 2007 14:10:00 +0800</pubDate>
<description><![CDATA[
<P>&nbsp;学电脑，最重要的是要动手实践。就如同人开口说话一样，你想想人是如何学会说话的呢：你是把语法学完后，把主、谓、宾都分析清楚了，才说话的吗？</P>
<P>&nbsp;显然不是！所以，你理解为什么中国人花了那么多年学习哑巴英语，是多么糟糕的方法了！</P>
<P>&nbsp;因为一开始就用分析的方法学习语言或语法，跟人的认知习惯是背道而驰的。</P>
<P>&nbsp;我们学习语言是从模仿具体的事物开始的，也是从最简单的使用开始的，所以，实践是最好的学习办法。</P>
<P>&nbsp;我们学习电脑编程也要用这个思路，才能入门。我们在网站上（<A href="http://www.dapenti.com/">www.dapenti.com</A>）提供了大量的资料，是帮助大家当手册来使用的，但不是需要大家都死记硬背。</P>
<P>&nbsp;我们这个课程，就是帮助初学者梳理学习编程的路线。帮助大家了解编程是怎么样的一种思维和表达方式。当大家做了一定练习后，然后自己一下就会明白编程是怎么的一回事情了。而且，可以从此踏上自学的道路。</P>
<P>&nbsp;我们只是引路人，但修行在于你自己。</P>
<P><BR><STRONG>课程预备：</STRONG></P>
<P>&nbsp;【1】如果你不知道KPL是什么东东，那么请首先阅读：</P>
<P><STRONG>&nbsp;KPL: 不仅仅是儿童编程语言</STRONG></P>
<P>&nbsp;<A href="more.asp?name=KPLer&amp;id=661">more.asp?name=KPLer&amp;id=661</A></P>
<P>&nbsp;<STRONG>为什么要学KPL？</STRONG></P>
<P>&nbsp;<A href="more.asp?name=KPLer&amp;id=3383">more.asp?name=KPLer&amp;id=3383</A></P>
<P>&nbsp;我特别推荐一篇关于美国信息技术教育白皮书内容的文章，供大家参考：</P>
<P>&nbsp;<STRONG>技术在K-12年级教育中的应用：未来展望</STRONG></P>
<P>&nbsp;<A href="more.asp?name=KPLer&amp;id=4612">more.asp?name=KPLer&amp;id=4612</A></P>
<P>&nbsp;【2】接下来，热心的家长们最关心的问题是：我的孩子可以学习吗？</P>
<P>&nbsp;我们认为孩子过早地开始学习KPL，不一定是好事情，这和孩子的爱好和前期准备有关。我们推荐的时间是从初中开始。</P>
<P>&nbsp;而家长是否懂电脑编程，我们认为倒不是一个太大的问题。家长可以指导孩子怎么使用网上的资料，并不一定要什么都会。</P>
<P>&nbsp;这部分我们推荐的阅读有：</P>
<P><STRONG>&nbsp;孩子什么时候学编程比较合适？</STRONG></P>
<P>&nbsp;<A href="more.asp?name=KPLer&amp;id=5001">more.asp?name=KPLer&amp;id=5001</A></P>
<P>&nbsp;<STRONG>给8-10岁的孩子一点准备！</STRONG></P>
<P>&nbsp;<A href="more.asp?name=kpler&amp;id=1518">more.asp?name=kpler&amp;id=1518</A></P>
<P><BR>&nbsp;【3】如果决定学习KPL，你需要一台可以运行windows xp的电脑。</P>
<P>&nbsp;我们没有在其他的操作系统下，比如vista下安装过KPL。所以，建议你最好使用windows xp系统，当然，大多数家用电脑，都是预装的该系统。因此，你无须为此做其他的准备。</P>
<P>&nbsp;据称，KPL可以安装到windows 98上，这对于一些老的机器来说，算是一个好消息。</P>
<P><BR>&nbsp;好了，我们在开始之前，就说那么多了。开始准备下载和安装KPL了。</P>
<P><BR><STRONG>下载和安装KPL</STRONG></P>
<P>&nbsp;我们推荐的阅读：</P>
<P>&nbsp;<STRONG>下载并安装KPL 1.1</STRONG></P>
<P>&nbsp;<A href="more.asp?name=KPLer&amp;id=291">more.asp?name=KPLer&amp;id=291</A></P>
<P>&nbsp;说明：首先下载程序，总共是两个。第一个是dotnetfx.exe,第二个是setup.exe。下载完成后，首先安装dotnetfx.exe(这个是支持KPL运行的环境软件),然后才是setup.exe(这个是KPL1.1)。</P>
<P>&nbsp;安装完成后，从“开始-&gt;所有程序-&gt;kids programming Language-&gt;kpl”,就可以运行KPL。</P>
<P>&nbsp;如果安装有问题，请先卸载已经安装的部分，然后重启电脑，重新按上述步骤安装即可。</P>
<P>&nbsp;我们在网站上还放置了一个完整的安装包，除了安装程序以外，还包括用户手册、操作培训、初级入门汉化程序文件和KPL开发环境的中文菜单等等。</P>
<P>&nbsp;相关地址：</P>
<P>&nbsp;<STRONG>KPL教学资料CD[rar压缩版]</STRONG></P>
<P>&nbsp;<A href="more.asp?name=kpler&amp;id=1910">more.asp?name=kpler&amp;id=1910</A></P>
<P>&nbsp;我们要说明的是：<STRONG>网站发布的资料是随时更新的。而完整包是阶段性更新</STRONG>。</P>
<P><STRONG>感受第一个KPL程序</STRONG></P>
<P>&nbsp;我们首先通过一个直观的视频教程来看，程序是如何在KPL中“编写”出来的。</P>
<P>&nbsp;相关阅读：</P>
<P>&nbsp;<STRONG>跟我学KPL[1]：Hello world</STRONG></P>
<P>&nbsp;<A href="more.asp?name=kpler&amp;id=290">more.asp?name=kpler&amp;id=290</A></P>
<P>&nbsp;说明：</P>
<P>&nbsp;第一次看，是一个感性认识，你不需要懂在做什么，你只是感受一下而已。</P>
<P>&nbsp;这个示例操作，演示了如下的一些内容：</P>
<P>&nbsp;【1】如何开始编写一个新的KPL程序；<BR>&nbsp;<BR>&nbsp;【2】如何在新的程序文件中，修改或重新输入程序代码；</P>
<P>&nbsp;【3】如何让程序运行一下，看看程序的结果是什么；</P>
<P>&nbsp;【4】如何保存程序；</P>
<P>&nbsp;后面还有一些，你看到一半，就可以停下来，这时你主要有几个疑惑：</P>
<P>&nbsp;【1】这些英文是什么意思？</P>
<P>&nbsp;【2】这些代码又是什么意思？</P>
<P>&nbsp;【3】我怎么才能知道这些意思?!</P>
<P><BR><STRONG>开始踏上学习之旅</STRONG></P>
<P>&nbsp;抱着这些疑问，我们开始踏上学习之旅。</P>
<P>&nbsp;要理解KPL的代码是怎么一回事，你需要完整的阅读：</P>
<P><STRONG>&nbsp;《KPL编程入门》</STRONG></P>
<P>&nbsp;<A href="more.asp?name=kpler&amp;id=1967">more.asp?name=kpler&amp;id=1967</A></P>
<P>&nbsp;你一边阅读，一边理解，并模仿跟我学KPL的视频教程，开始编写自己的第一个KPL程序。</P>
<P>&nbsp;开始的时候，每个人都会出很多的错，不是英文拼错了，就是写完了程序，不知道该怎么办。</P>
<P>&nbsp;还有就是程序出错了，找不到问题在哪儿。</P>
<P>&nbsp;好在，我们可以一个一个问题来解决。先写最简单的，哪怕是一句，或几句。找一下感觉。</P>
<P>&nbsp;我们会在以后的课程中，告诉大家如何找出程序的问题。</P>
<P>&nbsp;如果你觉得英文有些障碍，我们给你准备了一个简单的词汇表，供大家参考：</P>
<P>&nbsp;<STRONG>KPL学习指南[3]：KPL入门实用英语单词表</STRONG></P>
<P>&nbsp;<A href="more.asp?name=kpler&amp;id=1975">more.asp?name=kpler&amp;id=1975</A></P>
<P>&nbsp;如果KPL开发界面上的菜单或按钮，你不清楚什么意思的话，请阅读：</P>
<P>&nbsp;<STRONG>《KPL教师用户手册》里面的第一节：集成开发环境</STRONG></P>
<P>&nbsp;<A href="more.asp?name=kpler&amp;id=1972">more.asp?name=kpler&amp;id=1972</A></P>
<P><BR>&nbsp;按照这个提纲，我们大致可以开始学习KPL了，如果你有什么问题，可以发邮件给我们：dapenti2006#gmail.com (请把#换成@，这样可以防止垃圾邮件)。<BR></P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5191' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5191</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[吴文虎：别让“程序设计”成第二门“英语”[转载]]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5175</link>
<author>KPLer</author>
<pubDate>Sun, 08 Jul 2007 11:40:00 +0800</pubDate>
<description><![CDATA[
<P>[文章导读]<BR></P>
<P>吴文虎教授从“信息技术教育”的本质讲起，阐述了计算机教育变革的必要性以及他所秉承的教育理念。&nbsp;<BR><BR>[正文]&nbsp;<BR><BR>　　吴文虎教授&nbsp;1955年至1961年分别就读于清华大学电机工程系及自动控制系，现任清华大学计算机系教授、博士生导师，主要研究方向包括语音识别及语言理解、语音合成、语音信号数字处理等。他已连续十六年主讲研究生的学位课“语音信号数字处理”。从1990年至1997年，他担任人机语音通讯实验室的负责人。作为项目负责人或主要参加者，承担了多项国家级项目，并多次获奖。他曾于1991年至1999年担任中国计算机学会普及委员会主任。作为总教练和领队，他曾连续15年带领中国队参加国际信息学奥林匹克竞赛，中国队累计获金牌30块，银牌18块，铜牌13块。于1997年获“清华大学优秀教学成果特等奖”，1998年获“全国优秀教师一等奖”，1999年荣获“首都劳动奖章”，2001年获北京市高等教育教学优秀成果一等奖，2001年获“全国师德先进个人奖”，2002年获信息学奥林匹克国际委员会颁发的“特别贡献奖”，2003年获清华大学“教书育人奖”。他为本科生讲授的“程序设计基础”课于2003年被列为教育部精品课。2004年获中国计算机学会颁发的“杰出贡献奖”。<BR><BR>　　“中国青年软件振兴计划”系列实践活动之一——“软件产业理论与实践高校巡讲”开幕式在清华大学举行，全国高校计算机基础教育研究会副理事长、国际信息学奥林匹克中国队总教练吴文虎教授做了题为“信息技术教育与创造性人才培养”的精彩报告。吴文虎教授从“信息技术教育”的本质讲起，阐述了计算机教育变革的必要性以及他所秉承的教育理念。身为计算机教育界泰斗的吴文虎教授，在清华率先进行计算机教育方法的变革尝试，并取得了成功，他所倡导的软件人才培养理念得到了广大师生的认同。<BR><BR>　<STRONG>　不要让“程序设计”成为第二门“外语”</STRONG><BR><BR>　　记者：您在清华大学讲授一门叫做“程序设计基础”的课，并且对传统的计算机基础教育实行了崭新的改革？<BR><BR>　　吴文虎教授：是的。为了响应清华让“年纪大的教授要上讲台”的号召，我就开了一门“程序设计基础”的大课，现在我成了清华大学里年纪最大的“大课教师”了。其实教这门课不是我的专业，只是多年来我在从事计算机普及教育的过程中，在训练“国际信息学奥林匹克中国队”如何进行“程序设计”的过程中，慢慢地找到一些感觉，积累了一些经验。我一直觉得我国计算机基础教育的思路不对，就跟我国英语教学的思路不对一样，太注重讲“语法语义”，等到真正开口讲话时却“不会说话”，等到真正要设计软件时却写不出源代码！于是我就主张强化实践，让学生更多地上机编程。我的想法得到了系主任的支持，于是我就开了这门课，尝试着进行一些改革。<BR><BR>　　清华大学的学生都是高分考进来的，但是他们在上大学之前接触过计算机的并不多，所以这门课对他们来讲还是非常难的，刚开始有的同学甚至急得直哭。我告诉他们只要按部就班地照我的要求做，就肯定能把这门课学好。因为中学生都能掌握的东西，大学生掌握不了是不可能的。一个学期后，这项改革就有很明显的成效，这群“从零开始”的学生，都可以写一些小程序了。作为一名老教师，我就是希望自己能够发挥余热，为清华大学做点贡献，为我国的计算机教育做点贡献。<BR><BR>　　吴文虎老师所教的“程序设计基础”课，开课第一年就破格被清华大学评为精品课，这在清华大学建校以来是绝无仅有的；第二年，该课程被北京市教委评为精品课；第三年，该课程被国家教育部评为精品课。<BR><BR><STRONG>　　教育体制亟需改革<BR></STRONG><BR>　　记者：您认为信息时代的学生应该具备哪些素质？<BR><BR>　　吴文虎教授：学生一定要德、智、体、美、劳全面发展，缺一不可。作为老师，我们对学生的教育理念应该是：知识固然很重要，但没有能力也不行，升华一步就是要有素养。总体说来就是要具备以下几种素养：一、科学素养。科学素养不强的民族就没有办法谈富国强民。二十一世纪是信息化的世纪，所以在科学素养里还要增添一项“信息能力”，即获取信息的能力，处理信息的能力，分辨有害信息和无害信息、有用信息和无用信息的能力；二、道德素养。我们需要引导学生在求学时期养成良好的道德和法制意识。试想，如果我们培养的学生缺乏这方面的素养，那么他越是有能力，对社会造成的危害可能就越大，就像现在对网络造成严重危害的黑客肯定都是计算机高手。我觉得每一位老师都要有责任感，要把培养学生健康、健全的人格放在一个很重要的位置上，要真正做到“教书育人”。<BR><BR>　　记者：众所周知，印度跟我们一样也是第三世界国家，但是他们现在软件外包做得非常好，比我国要先进三到四年。我国的软件产业也发展了这么多年，信息化教育也提倡了这么多年，可软件人才还是非常匮乏，这是不是意味着我们的教育存在缺陷呢？<BR><BR>　　吴文虎教授：我觉得我国的教育体制存在着很大的问题。如果我国教育体制上的问题不解决，那就会在一定程度上制约我们教育的进一步发展。我认为我国的软件青年并不比印度差，我们主要是在教育体制、人才培养机制上需要进一步完善。<BR><BR>　　我国的教育体制需要改革，但也并不是全盘否认我们的教育，我们的基础教育就做得非常好，这是我们需要发扬光大的地方。需要改革的是我国教育上的弱点，我感触最深的有以下几个方面：<BR><BR>　　第一，我们的学生不敢讲出自己的观点想法，不敢标新立异。我经常在课堂上跟学生们讲：“尽管我站在这儿讲课，尽管我可能比你大50岁，但在科学的意义上我和你们是平等的。我非常希望我讲错的时候你们能够帮我指出来，就算你说得不对也没有关系。只要你有勇气站起来发言就已经得了99分，发言的对与错也就是1分的问题！”<BR><BR>　　第二，我国从中学开始文理分科的制度是不对的，因为文理科的学习内容其实是相辅相成的。可能人们一般都会觉得计算机专业的学生应该最重视数学，数学当然很重要，但是我认为计算机专业的学生应该更重视语文。因为思维和语言是紧密联系的，如果语文学不好就必然导致编程过程当中的思维混乱，就很难写出大的程序，又谈何设计开发软件呢？我曾经就这个观点和中科院计算机所所长李国杰院士交流过，他非常赞同我的观点。据他了解，大多数研究理工方向的院士都非常重视提高自身的文学素养，这样一来才会在自己的研究领域内拥有更为广阔的视野。其实学文科的也很需要学习一些理工科的课程，需要具备一定的自然科学知识。众所周知，中国哲学发展一直以来非常受限制，就是因为我们的哲学家大都是“纯”哲学家，他们很少涉足自然科学领域，这必然会制约他们的发展。<BR><BR>　　第三，我国的信息技术基础教育有待加强。当今的世界已经进入了信息时代，信息网络、信息技术以及由此而产生的信息经济和信息文化已经对人类社会产生了重要的影响，也将对人类社会的发展进程起到根本的决定性作用，它影响到一个国家的国民素养，影响到一个国家的建设速度。邓小平同志在1984年就曾经说过“计算机普及要从娃娃做起”，可是时隔20年，我国对中小学计算机基础教育的重视还远远不够。如果没有信息技术，我们谈何面向现代化、面向世界、面向未来？如果我们不精通信息技术，就定将落后，圆明园的惨剧就有可能重演。<BR><BR>　　最后一点就是我们的教育观念需要改革。步入信息时代，传统教育体制需要改革，教育观念的变革无疑首当其冲！我们应该运用先进的现代信息技术，因材施教，启发学生对先进科技的向往，激发学生的主体意识和创新意识，培养学生的自学能力，锻炼学生的动手实践能力，改变教学过程中教师、学生、教材三者之间的关系。教学过程应该以学生为中心，教师的作用是导师的作用——指导、组织、引导学生学习，调动学生的积极性、主动性，从而激发他们的潜能。学生的潜能是无可限量的，这一点我有切身体会。<BR><BR>　　我的一个学生，现在在复旦大学读大二，他今年给我送来了一本他写的书——《国际大学生程序设计竞赛系列丛书——组合数学在程序设计当中的应用》。《组合数学》是大学三年级的课程，可这名学生在高中就会了，他18岁读高中的时候就已经参加了国际数学家大会，而且做了15分钟的英文报告。这是国际上级别最高的数学科学会议，他是参加会议最年轻的一个人！但是这么优秀的学生还没有入选信息学国家奥赛队，他当时在国家队选拔赛上获得了三等奖第一名，而国家队则只从一等奖和二等奖中选拔。其实像这样的学生数不胜数，只要老师在教学的过程中善于诱导、启发，学生的潜能真的是无可限量的！<BR><BR><STRONG>　　做人·做事·求知·健体</STRONG><BR><BR>　　记者：您作为我国资深的德高望重的计算机教育专家，请您给我们青少年学子们一些成长、成才的建议，好吗？<BR><BR>　　吴文虎教授：我想，对于青年人来讲，最重要的一件事就是要珍惜时间。光阴如流水，青年的优势就在于年轻，所以要爱惜自己的时间。还有就是要敢于标新立异，敢于展现自己。这就需要青年们多参加社会活动，在锻炼中赢取自信！就像现在共青团中央指导、中国青基会和青科协正在举办的“中国青年软件振兴计划”就非常好，它包括的活动非常全面到位，“阿拉神灯杯”中国青年实用软件设计大赛可以激发青年的创新能力；“阿拉神灯杯”中国青年实用软件知识竞赛可以巩固青年的基础知识；“阿拉神灯杯”中国青年实用软件创意征文又可以无形中促使学生重视语文的学习。青年们就可以在这样的舞台上展示自己的风采，赢取自信嘛！<BR><BR>　　我认为青年要全面发展，具备综合素质，要在成长的过程中学会怎样做人，怎样做事，怎样求知，怎样健体！<BR><BR>　　首先事业有成的人一定懂得如何做人，这是很朴素的道理。杨振宁先生、朱镕基总理等来清华演讲时就要求学子们学会做人，金庸小说里的那些武术大师也都先修德，再修内功，不修德的人不是成为武林祸害，就是走火入魔。<BR><BR>　　怎样做事是强调敬业。敬业要从年轻的时候开始打基础，对学生来讲敬业就是在上课的整个过程当中全身心投入，认认真真、踏踏实实地学习，要对得起自己的学费，对得起家长，对得起老师，最重要的是对得起自己！虽然学习是自己的事情，但是个人的事情跟国家的事情是统一的，所以敬业特别重要。<BR><BR>　　怎样求知，就需要具备一种精神，这种精神就是“终身学习，不断探索、追求完美”，就是要敢于“打破砂锅‘问’到底”、“知难而进”！同时还要谦虚，不能“老子天下第一”，而是要“三人行，必有我师”，与人合作时要懂得尊重别人。&nbsp;<BR><BR>　　怎样健体，这包括两方面的内容：一方面要强健身体，一方面要强健心理。身体健康很重要，“身体是革命的本钱”；心理健康更重要，只有具备了良好的心态才可以做到以上各点，才可以充满自信、迎难而上，拥有更为广阔的发展空间！<BR><BR></P>
<P>来源：<A href="http://www.lnedu.net/oblog31/user1/155/archives/2006/20061216233429.html">http://www.lnedu.net/oblog31/user1/155/archives/2006/20061216233429.html</A></P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5175' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5175</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[如何使用系统函数？]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5133</link>
<author>KPLer</author>
<pubDate>Thu, 05 Jul 2007 14:14:00 +0800</pubDate>
<description><![CDATA[
<P>　有网友给我们来邮件问：怎么画空心圆？</P>
<P>&nbsp;&nbsp; 他写的代码中，有一句是这样的：</P>
<P>&nbsp;&nbsp; circle(80,true)</P>
<P>&nbsp;&nbsp; 这个语句只能画出实心圆。</P>
<P>&nbsp;&nbsp; 这看起来是个很简单的问题，但对初学者来说，是个大的障碍。</P>
<P>&nbsp;&nbsp; 我们今天给大家说一个自己可以动手解决此类问题的方法。</P>
<P>&nbsp;&nbsp; 先还是解释一些概念，然后说明，我们如何去找想要知道的信息。</P>
<P><BR><STRONG>什么是系统函数和方法？</STRONG></P>
<P>&nbsp;对KPL来说，就是事先在语言中已经设计，并可以直接使用的函数或方法。言下之意：有些计算方法，KPL已经提供了，你不用自己再去实现它，比如：画圆，画矩形，正弦、余弦、随机..</P>
<P>&nbsp;大家问了：<STRONG>我怎么知道有哪些系统函数呢？</STRONG></P>
<P>&nbsp;我们有提供给这样一个文档，可能你忘了：）</P>
<P>&nbsp;《KPL系统方法和函数》电子书在线阅读版</P>
<P>&nbsp;访问地址：<A href="more.asp?name=kpler&amp;id=1973">more.asp?name=kpler&amp;id=1973</A></P>
<P>&nbsp;我们来演示一下怎么用这个文档：</P>
<P>&nbsp;当我们在编写代码时，我们把鼠标移动到circle时，我们会看见一个提示：</P>
<P>&nbsp;System Method Circle(Size as Int,Filled as Bool)</P>
<P>&nbsp;这个提示包含了如下信息：</P>
<P>&nbsp;【1】System 是“系统”的意思，表示这个是由KPL自己提供的方法，这个方法有两个参数；</P>
<P>&nbsp;【2】然后我们到《KPL系统方法和函数》里去找：我们在“画笔方法”中找到该方法的解释；</P>
<P>&nbsp;【3】比较不幸的是：文档里好像没有说明参数的含义。但size的意思很明确，是“大小”的意思,我们估计是圆的直径，filled 是“是否填充”的意思。那么我们是否可以理解为：filled为true时，代表画实心圆，filled为false时，代表画空心圆；</P>
<P>&nbsp;【4】自己试试看？果然如此！</P>
<P><BR><STRONG>&nbsp;KPL的系统方法和函数，及其参数的含义，大多数都可以从其英文的字面意思上就可以理解。</STRONG></P>
<P>如果你不熟悉英文，我们给你一个简单的查字典的方法，去<A href="http://www.google.cn/">www.google.cn</A>,然后在搜索框中输入：</P>
<P>&nbsp;fy circle</P>
<P>&nbsp;意思就是：把circle翻译（fy）成中文。很简单不是？</P>
<P>&nbsp;</P>
<P>&nbsp;通过上面的办法，你可以解决到很多类似不清楚的问题。</P>
<P>&nbsp;我们有个建议，你可以抽出点时间，把《KPL系统方法和函数》里面的分类及其函数方法，简单扫描一遍，有个大致的印象。这样做的好处是，下次你不用费劲心思去解决一个已经有答案的问题。</P>
<P>&nbsp;你或许有更多宝藏可以发现：原来播放声音是如此简单；画椭圆和画矩形都是现成的；屏幕的大小可以自由设置...</P>
<P>&nbsp;你对系统函数了解越多，你就能自如地使用它，做出不可思议的程序来。</P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5133' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5133</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[版权和转载申明]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5017</link>
<author>KPLer</author>
<pubDate>Tue, 03 Jul 2007 13:51:00 +0800</pubDate>
<description><![CDATA[<P>&nbsp;&nbsp; 近日，发现网上有论坛转载我们的KPL教程，但令人遗憾的是，这些网站缺乏对我们辛勤劳动最起码的尊重。传播本来是好事情，但不是你的，说成是你的，就是可耻的事情。而且，有些东西还以讹传讹，说什么coding4fun是什么儿童编程语言，一派胡言。</P>
<P><STRONG>本站特此申明</STRONG>：</P>
<P>本网站KPL中文译文、文字和视频教程及其相关原创资料，均属本站所用。</P>
<P>&nbsp;&nbsp; 网站授权所有个人学习者，可自由使用该网站资源。但不得从事用于商业目的活动。</P>
<P>&nbsp;&nbsp; 教育行业可在自己的学校网站，IT论坛内引用本站内容，须经本站同意,，且须注明：</P>
<P>&nbsp;&nbsp;<STRONG> 来源：敏捷培训大巴 </STRONG><A href="http://www.dapenti.com"><STRONG>www.dapenti.com</STRONG></A>&nbsp;</P>
<P>&nbsp;&nbsp; 媒体合作垂询，联系方式：<A href="mailto:dapenti2006@gmail.com">dapenti2006@gmail.com</A></P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5017' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5017</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[孩子什么时候学编程比较合适？]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5001</link>
<author>KPLer</author>
<pubDate>Mon, 02 Jul 2007 15:18:00 +0800</pubDate>
<description><![CDATA[
<P>暑期来临，很多家长和长辈准备利用这个假期，让孩子学点KPL。</P>
<P>我来说说我的看法，供大家参考。</P>
<P><BR>【1】孩子不宜学的太早</P>
<P>&nbsp;其实这个问题是：孩子什么时候开始学习编程，比较合适？</P>
<P>&nbsp;我个人认为，孩子学编程，并不是越早越好。</P>
<P>&nbsp;为什么这样说呢？</P>
<P>&nbsp;因为孩子在初中以前的这个阶段，想像能力占主导地位，形象思维比较强。而学习电脑编程，算是训练一种逻辑思维，需要一点抽象能力，需要一点数学知识作为基础。</P>
<P>&nbsp;现在很多小学，从二、三年级开始，让孩子接触到电脑，这是正确的，孩子们学习如何使用电脑，打打字，画会画，把电脑当工具使用。这没有太大问题。家长要控制的只是不要让孩子迷恋上网络，把电脑当成了娱乐工具。</P>
<P>&nbsp;四五六年级的孩子，有些基本的数学知识了。而且，按我们国家现在的方式，有些学奥数的孩子，可能还知道一些初中的数学知识。有条件的家庭，可以适当地开始接触编程方面的知识。</P>
<P>&nbsp;我也听说过，有孩子在五六年级就开始学数据库的，然后，10多岁的孩子就开始编写人力资源软件。这些新闻煽动得人心惶惶。大家都生怕孩子吃了大亏一样。</P>
<P>&nbsp;我告诉大家：这样的拔苗助长，没有任何好处。任何一个专业软件的开发，都需要综合的知识和专业的技能。编程只是其中的一小块。</P>
<P>&nbsp;所以，我的建议，学习KPL的最佳开始时间是：从初中开始。</P>
<P><BR>【2】学习的方式和重点</P>
<P>&nbsp;电脑编程的方式，首先跟我们平时的方式有点不同：你必须要自己动手做，而不是光在头脑里面想，就能想出来的。</P>
<P>&nbsp;这正是学习编程迷人的地方：你可以自己动手，自己校正，得出心里想要的结果。</P>
<P>&nbsp;一般的学习，总是希望有个老师先教一下，然后才让孩子去做。但我个人的看法，刚好相反：</P>
<P>&nbsp;让孩子跟着教程看，自己动手做，不宜贪多，不懂就到KPL的qq群里来问，多做练习。开始的时候，就是从模仿程序开始。</P>
<P>&nbsp;家长也可以先学，但学完后，也只是指导，协助，讨论。刚开始的时候，可以给孩子演示过程。</P>
<P>&nbsp;这样的话，我们可以得到什么呢？</P>
<P>&nbsp;前所未有的自学能力。开始是很难，但一旦开始了，孩子的思维方式会有很大的提高。</P>
<P>&nbsp;不要把电脑编程，仅仅当成是学习一门技能，而是从整个过程获益：怎么思考的，逻辑顺序是如何的，是否还有其他的方法，怎么样跟已经学过的数学知识联系，怎么用画板替换示例中的图像等等。</P>
<P>&nbsp;理解编程的结构，熟悉编程的方式，认真阅读代码示例，然后练习，一定会有所收获。</P>
<P>&nbsp;通过编程技能，把学习过的东西串联起来，开拓逻辑思维的能力，这才是技术教育的价值所在。</P>
<P>【3】KPL能给大家带来什么&nbsp;</P>
<P>&nbsp;现在我们网站上的资料（<A href="http://www.dapenti.com/">www.dapenti.com</A>）已经可以让大家用上3年的了。当然，这是我个人保守的看法。</P>
<P>&nbsp;我觉得，如果合理地安排自学的话，一个初中毕业学过KPL的孩子，在电脑编程的入门方面，跟现在的大学本科的学生相差无几。而且，还不需要特别的什么安排和专门的学习，只要能把网站上的代码看明白就行！</P>
<P>&nbsp;我们国家的教育是很让人不明白的：初中生都学高中的知识了，高中生都学大学的知识了，可到了大学里面使用电脑的智商却很低。</P>
<P>&nbsp;我们的教育浪费了大量的时间去面对考试，而对孩子的动手能力、逻辑思维和系统能力的培养，无动于衷，乏善可陈。</P>
<P>&nbsp;好在，我们可以给孩子一些长远的准备，来弥补这些不足。我们可以用放松的心态来准备这一切：1年不行，还有3年，3年不行，还可以延续，没有太大的压力，让孩子对自己有学习的把握，有自己控制的能力。这一切就已经足够了。</P>
<P><BR>&nbsp;</P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5001' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=5001</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[《KPL游戏示例代码讲解》电子书在线阅读版]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4988</link>
<author>KPLer</author>
<pubDate>Sun, 01 Jul 2007 17:45:00 +0800</pubDate>
<description><![CDATA[
<OBJECT codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0 height=550 width=800 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000><PARAM NAME="_cx" VALUE="21167"><PARAM NAME="_cy" VALUE="14552"><PARAM NAME="FlashVars" VALUE=""><PARAM NAME="Movie" VALUE="target/kpl/KPL游戏示例代码讲解.swf"><PARAM NAME="Src" VALUE="target/kpl/KPL游戏示例代码讲解.swf"><PARAM NAME="WMode" VALUE="Window"><PARAM NAME="Play" VALUE="-1"><PARAM NAME="Loop" VALUE="-1"><PARAM NAME="Quality" VALUE="High"><PARAM NAME="SAlign" VALUE=""><PARAM NAME="Menu" VALUE="0"><PARAM NAME="Base" VALUE=""><PARAM NAME="AllowScriptAccess" VALUE=""><PARAM NAME="Scale" VALUE="NoBorder"><PARAM NAME="DeviceFont" VALUE="0"><PARAM NAME="EmbedMovie" VALUE="0"><PARAM NAME="BGColor" VALUE=""><PARAM NAME="SWRemote" VALUE=""><PARAM NAME="MovieData" VALUE=""><PARAM NAME="SeamlessTabbing" VALUE="1"><PARAM NAME="Profile" VALUE="0"><PARAM NAME="ProfileAddress" VALUE=""><PARAM NAME="ProfilePort" VALUE="0"><PARAM NAME="AllowNetworking" VALUE="all"><PARAM NAME="AllowFullScreen" VALUE="false">
<embed src=target/kpl/KPL游戏示例代码讲解.swf pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width=800 height=550></embed></OBJECT><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4988' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4988</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[用设计的方式理解程序语言]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4857</link>
<author>KPLer</author>
<pubDate>Tue, 26 Jun 2007 13:19:00 +0800</pubDate>
<description><![CDATA[
<P>&nbsp;初学电脑编程的人，一般都不知道变量和循环什么的怎么用。这是很正常的事情。之所以这样，其实主要是因为你不知道程序语言是如何设计的，这样的设计有何意图。</P>
<P>&nbsp;刚开始学习的人，都会经历这个过程，没有什么好担心的。你可以轻易地越过这个障碍！</P>
<P>&nbsp;简单地说，一段程序主要是模拟一个过程，这个过程里面主要包含了逻辑和计算的部分。</P>
<P><BR><STRONG>（一）为什么要申明变量？</STRONG></P>
<P>&nbsp;比如，我们从小学做的一道题：1+2=？</P>
<P>&nbsp;小时候，我们都是搬手指头，可电脑没有大脑，也没有手指，它只有电子大脑-内存：一个用来保存数据准备用来计算的地方。程序语言的设计者设计了这个把戏，把它命名为：变量。</P>
<P>&nbsp;你可以把变量理解为一个容器，不同的容器可以装不同的东西。程序里面把不同类型的变量称之为：数据类型。</P>
<P>&nbsp;我们来看看电脑是如何工作的：你要首先命名一个变量x，在命名的同时指导其数据类型，相当于告诉电脑只能装什么东西，电脑接到指令后，根据指示，分配存储的内存空间。</P>
<P>&nbsp;在KPL中，用下面这句话就代表了上面的整个过程：Var count As Int</P>
<P>&nbsp;意思是：电脑啊，我要分配一个空间，这个空间叫count，它用来装整数的，ok,准备好了吗？</P>
<P>&nbsp;这个语句告诉了我们什么呢：电脑不是天才，如果你不告诉它怎么做，他就是一个白痴。你也会明白，在程序语言的设计中，我们要帮助电脑，给他一点指挥和帮助才行。</P>
<P>&nbsp;接下来的事情，就是在分配的空间中装东西了：count=1。这个语句的意思是把整数1放在变量容器count里面。</P>
<P>&nbsp;那么，下面的语句是什么意思呢 ？</P>
<P>&nbsp;count=count+1</P>
<P>&nbsp;如果按我们平时的学的数学的观点，上面的等式是不成立的。但是在电脑里面，根据我们刚才说的容器的概念，它的意思也很清楚：</P>
<P>&nbsp;在原有容器的基础上，数量加1，如果原来的count是1，加1后，count的值就变成了2。</P>
<P>&nbsp;变量的声明，是所有程序准备计算和逻辑判断的开始，因为电脑最终只能理解数字，也只能理解已经数学化的过程。</P>
<P><STRONG>（二）什么是逻辑和计算？</STRONG></P>
<P>&nbsp;数学是很抽象的事情，比如：1+2=？可能代表不同的问题：</P>
<P>&nbsp;【1】1颗棒棒糖，加上2个棒棒糖，一共几个棒棒糖？</P>
<P>&nbsp;【2】买一送二，买一个大蛋糕，送你两片口香糖，你得到多少个礼物；</P>
<P>&nbsp;【3】你们家：两个大人，一个小孩，还是一个大人，两个孩子。一共多少人？</P>
<P>&nbsp;在上面的问题下，数学的结果是一样的，不关心吃了糖是不是坏牙齿，礼物是大是小，你们家人怎么构成的。</P>
<P>&nbsp;但是，你注意到没有，上面三个问题，最后都变成了一道数学题。电脑编程也是大致如此的：你要把需要知道或了解的结果，变成一个判断和计算的过程，模拟出来。</P>
<P>&nbsp;1967年，有两位美国科学家用数学的方法证明了：任何过程都只需要三种结构来描述，即顺序结构、条件分枝结构、循环结构。</P>
<P>&nbsp;这意味着，如果程序来模拟过程的话，也只需要三类语句来实现。</P>
<P>&nbsp;【顺序结构】<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;不需要特殊语句，程序本身就是顺序执行的</P>
<P>&nbsp;【条件/分支】&nbsp;</P>
<P>&nbsp;&nbsp;if/then/else/endif</P>
<P>&nbsp;【循环】</P>
<P>&nbsp;&nbsp;loop循环</P>
<P>&nbsp;&nbsp;while循环</P>
<P>&nbsp;&nbsp;for循环</P>
<P><BR>&nbsp;事实上，到目前为止，所有的程序语言设计大多如此。</P>
<P>&nbsp;让我们来看一个例子：计算1+2+3+......+100=?</P>
<P>&nbsp;要求计算出：（1）总和；（2）分别算出奇数和偶数的和；</P>
<P>&nbsp;我们来看给出的一种解法。<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;//申明变量<BR>&nbsp;&nbsp;Var count As Int&nbsp;//<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;Var num As Int&nbsp;//保存总和<BR>&nbsp;&nbsp;Var num1 As Int //保存奇数和<BR>&nbsp;&nbsp;Var num2 As Int //保存偶数和<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;//反复累加，重复做的事情就需要循环<BR>&nbsp;&nbsp;For count=1 To 100<BR>&nbsp;&nbsp;&nbsp;num=num+count&nbsp;//累加运算<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;//条件判断，是奇数，还是偶数<BR>&nbsp;&nbsp;&nbsp;//如果除以2，余数为0，则是偶数<BR>&nbsp;&nbsp;&nbsp;If (count Mod 2=0) Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;num2=num2+count<BR>&nbsp;&nbsp;&nbsp;Else<BR>&nbsp;&nbsp;&nbsp;&nbsp;//奇数和计算<BR>&nbsp;&nbsp;&nbsp;&nbsp;num1=num1+count<BR>&nbsp;&nbsp;&nbsp;End If<BR>&nbsp;&nbsp;Next<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;//输出结果，否则看不到<BR>&nbsp;&nbsp;PrintLine(num)<BR>&nbsp;&nbsp;PrintLine(num1)<BR>&nbsp;&nbsp;PrintLine(num2)<BR>&nbsp;<BR>&nbsp;上面这个简单的例子，包含了程序最基本的结构。<BR>&nbsp;<BR><STRONG>（三）用需要的方式来理解程序语言的设计</STRONG></P>
<P>&nbsp;<STRONG>数组</STRONG>：用来存放相同数据类型的一个系列空间。相当于同一个单元的户型一样。&nbsp;</P>
<P><STRONG>自定义数据结构</STRONG>：信息总是比较多的。而且信息有个特点，它并不总是单独存在。比如，拿我们自己来说吧，跟自己相关的信息很多，姓名、年龄、性别、电话、家庭住址等等。如果我们要表明相关信息，给每个信息设置一个变量，是一个非常麻烦的事情。</P>
<P>程序的设计者考虑到了这一点，通过自定义数据结构来打包访问。</P>
<P>&nbsp;Structure People<BR>&nbsp;&nbsp;name as string<BR>&nbsp;&nbsp;age as int<BR>&nbsp;&nbsp;address as string<BR>&nbsp;end Structure</P>
<P>&nbsp;这样当我们申明一个people类型的变量时，就可以这样使用：</P>
<P>&nbsp;var curuser as People</P>
<P>&nbsp;curuser.name="kpler"<BR>&nbsp;curuser.age=2<BR>&nbsp;curuser.address="<A href="http://www.dapenti.com/">www.dapenti.com</A>"</P>
<P>&nbsp;你看，这样是不是很简单？！</P>
<P>&nbsp;<STRONG>函数和方法</STRONG>：一小段代码，保证你可以重复使用。重复计算是电脑最拿手的了。尽量让电脑重复，而不是我们去做重复的事情，是电脑存在的一个重要理由。</P>
<P>&nbsp;方法就是执行一段代码。但代码不会返回一个结果，而函数会。</P>
<P>&nbsp;这是一个方法：<BR>&nbsp;Method SayHello()<BR>&nbsp;&nbsp;PrintLine ("Hello!中文")<BR>&nbsp;End Method</P>
<P>&nbsp;这是一个带有参数的方法：</P>
<P>&nbsp;Method SaySomething(SomeThing As String)<BR>&nbsp;&nbsp;PrintLine (Something)<BR>&nbsp;End Method&nbsp;&nbsp;</P>
<P>&nbsp;这是一个函数：</P>
<P>&nbsp;function fundemo(num as int) as bool<BR>&nbsp;&nbsp;if (num mod 2=0) then<BR>&nbsp;&nbsp;&nbsp;return True<BR>&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;return false<BR>&nbsp;&nbsp;end if<BR>&nbsp;end function</P>
<P>&nbsp;记住：函数要返回一个结果。</P>
<P>&nbsp;有人会问了，怎么才能使用函数和方法呢？</P>
<P>&nbsp;简单地说，任何过程首先都是线性的过程，象一条直线一样，但如果你发现在这个过程中，有些东西反复在做，或者做的差异只是改改数字或小的改动，那么，你可以把这个重复的过程提出来，放在一个函数或方法里面。</P>
<P>&nbsp;这样做的好处是：你通过改变传递参数的值就可以完成相同的工作，不必重复劳动；通过这个办法，你把很长的程序，变成了一个个的小豆腐块，这样的豆腐块有很多在其他的代码中也可以使用，这样，编程变成了一个一劳永逸的事情。</P>
<P><STRONG>（四）高级概念</STRONG></P>
<P>&nbsp;其实编程还有很多相对比较高级的概念。你想想看，我们在使用word或上网的时候，我们在用一个软件的时候，很少看到计算的部分。</P>
<P>&nbsp;因为真正的软件在与人的动作的交互过程中，提供了一个重要的部分：人机界面。简单地说，就是把计算和逻辑的部分隐藏起来，用一种友好的界面来给人打交道。</P>
<P>&nbsp;这部分的设计并不包含在基础的程序语言里面，而是包含在专业的开发工具提供的界面元素中。刚开始，大家知道这一点就可以了。</P>
<P>&nbsp;还有在电脑编程里面，有大量的错误处理的代码。因为人很容易犯错，我们的操作也可能导致电脑不能解释而崩溃。</P>
<P>&nbsp;总而言之，大家要明白一个概念：&nbsp;电脑编程语言是对过程的一种模仿，它是一种逻辑和技术的工具，也是和人交互的接口。所有的电脑编程元素的设计，都是从人的使用和理解出发，结合应用的需要而设计的。</P>
<P>&nbsp;这样看来:知识并非是一成不变的，如果我们需要它改变，它就可以改变。这也说明了为什么世界上有那么多的编程语言。&nbsp;好的编程语言，代表了设计者的着眼点和应用的倾向：拿KPL来说，它就是设计给初学者，麻雀虽小，五脏俱全。而在专门的小游戏上面，又独具匠心，给初学者屏蔽了大量的知识要求，而代之以核心的编程要素，让人很快上路。</P>
<P>&nbsp;如果你能从应用的角度去理解程序的语言，那么你总是能很快画出自己学习的地图，在电脑的世界里，你可以学到：没有什么不可以。</P>
<P>&nbsp;</P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4857' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4857</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[KPL游戏示例讲解[18-8]: 猜顺序]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4823</link>
<author>KPLer</author>
<pubDate>Sun, 24 Jun 2007 15:51:00 +0800</pubDate>
<description><![CDATA[<P class=MsoListParagraph style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -36pt; TEXT-ALIGN: left; mso-layout-grid-align: none; mso-char-indent-count: 0; mso-list: l0 level1 lfo1" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体; mso-bidi-theme-font: minor-fareast"><SPAN style="mso-list: Ignore">（4）<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">顺序显示灯亮的状态：</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: 0cm; TEXT-ALIGN: left; mso-layout-grid-align: none; mso-char-indent-count: 0" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Method</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> PlaySequence(Notes </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">As</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Int</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">显示从</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">1</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">到当前猜次的灯的状态</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Var</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> idx </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">As</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Int</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">先关闭所有的灯</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">For</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> idx </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 1 </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">To</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 4<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DrawLight(idx, </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">False</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Next</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">显示灯亮顺序</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">For</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> idx </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 1 </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">To</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> Notes<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">灯先亮一下</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> <SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Drawlight(LightList[idx], </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">True</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>RefreshScreen()<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Delay(Timing)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">再把灯关掉，造成闪烁的效果</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Drawlight(LightList[idx], </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">False</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>RefreshScreen()<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Delay(20)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Next</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: 0cm; TEXT-ALIGN: left; mso-layout-grid-align: none; mso-char-indent-count: 0" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">End Method<o:p></o:p></SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: 0cm; TEXT-ALIGN: left; mso-layout-grid-align: none; mso-char-indent-count: 0" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: 0cm; TEXT-ALIGN: left; mso-layout-grid-align: none; mso-char-indent-count: 0" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Method</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> PrintScore()<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">输出当前得分和最佳分数</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>Color(8)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>MoveTo(10, 415)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>Rectangle(120, 60, </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">True</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>MoveTo(300, 415)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>Rectangle(120, 60, </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">True</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>PrintNumber(Best, 10, 405)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">//</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">以下处理，是为了显示上对位，小于</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">10</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">的数只有</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">1</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">位数，显示上可能错位。这是一个常见的处理细节</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> Score </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">&lt;</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 10 </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Then</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>PrintNumber(Score, 350, 405)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Else</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>PrintNumber(Score, 310, 405)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">End If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">End Method</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P>&nbsp;</P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4823' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4823</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[KPL游戏示例讲解[18-7]: 猜顺序]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4822</link>
<author>KPLer</author>
<pubDate>Sun, 24 Jun 2007 15:50:00 +0800</pubDate>
<description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> NoteCount </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">&gt;=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> ArrayLength(LightList) </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Then</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 7">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">//</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">整个顺序全部猜完</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> <SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 7">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Alert(</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">"Congratulations!<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>You have completed the entire sequence of "</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">+</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> ArrayLength(LightList) </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">+</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">" steps."</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">, </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">"Simon says:"</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 7">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>ExitInputLoop </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">True</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>ExitGameloop </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">True</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Else</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 7">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">增加速度</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 7">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> (LastNote </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Mod</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 2) </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 0 </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Then</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 8">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> Timing </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">&gt;</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 30 </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Then</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 9">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Timing </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> Timing </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">-</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 20<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 8">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">End If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 7">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">End If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 7">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>ExitInputLoop </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">True</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">End If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Else</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">还没有猜完所有的数，需要继续</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>NoteCount </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> NoteCount </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">+</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 1<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">End If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Else</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">按键不正确的话</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>PlaySound(</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">"SpatialShift.wav"</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Delay(900)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>ExitInputLoop </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">True</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>ExitGameloop </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">True</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">End If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">End While</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DrawLight(try, </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">False</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">End While</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: 0cm; TEXT-ALIGN: left; mso-layout-grid-align: none; mso-char-indent-count: 0" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1"></SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">End While</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P>&nbsp;</P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4822' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4822</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[KPL游戏示例讲解[18-6]: 猜顺序]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4821</link>
<author>KPLer</author>
<pubDate>Sun, 24 Jun 2007 15:48:00 +0800</pubDate>
<description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">While</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> ExitInputLoop </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">False</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">等待按键输入</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>try </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 0<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">While</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> try </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 0<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>key </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> GetKey()<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> key </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">"1"</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Then</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>try </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 1<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">End If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> key </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">"2"</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Then</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>try </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 2<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">End If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> key </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">"3"</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Then</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>try </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 3<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">End If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> key </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">"4"</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Then</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>try </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 4<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">End If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">End While</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">//</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">显示一下按键对应的灯亮</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DrawLight(try, </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">True</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">比较灯亮顺序是否一致，即猜序</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> try </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> LightList[NoteCount] </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Then</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">按键正确</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">-</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">保存得分</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Score </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> NoteCount<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> Score </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">&gt;</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> Best </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Then</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Best </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> Score<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">End If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>PrintScore()<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">是否是猜的数跟当前顺序的数相同</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> NoteCount </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> LastNote </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Then</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">是</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">播放声音</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Delay(200)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">表示完成</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> <SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>PlaySound(</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">"Tada.wav"</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DrawLight(try, </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">False</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Delay(900)<o:p></o:p></SPAN></P>
<P>&nbsp;</P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4821' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4821</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[KPL游戏示例讲解[18-5]: 猜顺序]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4820</link>
<author>KPLer</author>
<pubDate>Sun, 24 Jun 2007 15:44:00 +0800</pubDate>
<description><![CDATA[
<P class=MsoListParagraph style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -36pt; TEXT-ALIGN: left; mso-layout-grid-align: none; mso-char-indent-count: 0; mso-list: l0 level1 lfo1" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体; mso-bidi-theme-font: minor-fareast"><SPAN style="mso-list: Ignore">（3）<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">游戏循环的部分：</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: 0cm; TEXT-ALIGN: left; mso-layout-grid-align: none; mso-char-indent-count: 0" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">程序主循环</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">While</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">True</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">新游戏开始播放声音</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>PlaySound(</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">"Utopia Asterisk.WAV"</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Delay(900)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">随机产生一个亮灯的顺序</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">For</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> idx </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 1 </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">To</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> ArrayLength(LightList)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>LightList[idx] </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> Random(1, 4)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Next</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">游戏循环开始</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Score </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 0<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Timing </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 500<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>ExitGameLoop </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">False</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>LastNote </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 2<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">While</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> ExitGameLoop </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">False</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">猜下一个数，包括第一个数</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>PrintScore()<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>LastNote </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> LastNote </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">+</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 1<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>PlaySequence(LastNote)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">开始输入循环</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>ExitInputLoop </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">False</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>NoteCount </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 1<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 3">&nbsp;&nbsp;</SPAN></SPAN></P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4820' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4820</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[KPL游戏示例讲解[18-4]: 猜顺序]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4819</link>
<author>KPLer</author>
<pubDate>Sun, 24 Jun 2007 15:43:00 +0800</pubDate>
<description><![CDATA[<P class=MsoListParagraph style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -36pt; TEXT-ALIGN: left; mso-layout-grid-align: none; mso-char-indent-count: 0; mso-list: l0 level1 lfo1" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体; mso-bidi-theme-font: minor-fareast"><SPAN style="mso-list: Ignore">（2）<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">绘制灯亮的方法：</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: 0cm; TEXT-ALIGN: left; mso-layout-grid-align: none; mso-char-indent-count: 0" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Method</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> DrawLight(Index </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">As</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Int</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">, Bright </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">As</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Bool</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">画出灯亮</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">, </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">或灯暗</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Var</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> X </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">As</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Int</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> (Index </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">-</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 1) </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Mod</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 2<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Var</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> Y </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">As</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Int</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> (Index </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">-</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 1) </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">/</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 2<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>Pen(</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">False</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">确保先前的灯已经关掉了</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> Previous </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">&gt;</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 0 </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Then</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> Previous </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">&lt;&gt;</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> Index </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Then</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DrawLight(Previous, </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">False</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">End If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">End If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">设置灯的颜色（不同的颜色代表灯亮或灯暗）</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> Bright </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Then</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Color(LightOn[Index])<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>PlaySound(SoundList[Index])<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Else</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Color(LightOff[Index])<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">End If</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">绘制灯的区域</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>MoveTo( 20 </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">+</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> X </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">*</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 200, 20 </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">+</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> Y </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">*</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 200)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>Rectangle(180, 180, </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">True</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>PrintNumber(Index, 80 </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">+</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> X </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">*</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 200, 70 </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">+</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> Y </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">*</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 200 )<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>Previous </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> Index<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: 0cm; TEXT-ALIGN: left; mso-layout-grid-align: none; mso-char-indent-count: 0" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">End Method</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P>&nbsp;</P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4819' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4819</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[KPL游戏示例讲解[18-3]: 猜顺序]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4818</link>
<author>KPLer</author>
<pubDate>Sun, 24 Jun 2007 15:42:00 +0800</pubDate>
<description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">代码讲解：</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -36pt; TEXT-ALIGN: left; mso-layout-grid-align: none; mso-char-indent-count: 0; mso-list: l0 level1 lfo1" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体; mso-bidi-theme-font: minor-fareast"><SPAN style="mso-list: Ignore">（1）<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">老办法，从</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">Main</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">看下去：</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 0cm; TEXT-ALIGN: left; mso-layout-grid-align: none; mso-char-indent-count: 0" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">屏幕设置和初始化</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>SetScreenSize(420, 500)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>Clear(8)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">每个灯对应不同的声音</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>SoundList[1] </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">"Laser.wav"<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>SoundList[2] </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">"MenuBeep.wav"<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>SoundList[3] </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">"PlasmaCannon.wav"<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>SoundList[4] </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">"PowerUp.wav"<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">//</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">设置灯亮和灯暗的颜色值</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>LightOn[1] </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 114<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>LightOn[2] </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 78<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>LightOn[3] </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 42<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>LightOn[4] </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 139<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>LightOff[1] </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 81<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>LightOff[2] </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 26<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>LightOff[3] </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 91<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>LightOff[4] </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> 98<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">最好</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> / </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">积分牌</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>Pen(</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">False</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>Color(137)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>SetFont(</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">"Tahoma"</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">, 12, </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">True</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">, </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">False</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">, </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">False</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>MoveTo(25, 475)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>Print(</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">"Best"</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>MoveTo(345, 475)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>Print(</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">"Score"</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">设置分数显示的字体</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>SetFont(</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">"Tahoma"</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">, 48, </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">True</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">, </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">False</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">, </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">False</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">// </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">绘制灯亮区域</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>DrawLight(1, </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">False</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>DrawLight(2, </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">False</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>DrawLight(3, </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">False</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">DrawLight(4, </SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">False</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">)<o:p></o:p></SPAN></P>
<P>&nbsp;</P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4818' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4818</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[KPL游戏示例讲解[18-2]: 猜顺序]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4817</link>
<author>KPLer</author>
<pubDate>Sun, 24 Jun 2007 15:41:00 +0800</pubDate>
<description><![CDATA[
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">我们还是来看看该游戏前面注释中，整理出的编程思路，了解一下：</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">/*<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>Draw Title screen<SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">画出标题屏幕</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>Start Program Loop<SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">程序循环开始</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Pick light sequence<SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">随机产生一个亮灯的顺序</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Start Game loop<SPAN style="mso-tab-count: 1">&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">游戏循环开始</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Increment LastNote<SPAN style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Play sequence<SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">表演一下选择的灯亮顺序</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Start Input loop<SPAN style="mso-tab-count: 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">开始输入循环处理</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Get key<SPAN style="mso-tab-count: 6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">等待键盘输入</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Compare key to LightList<SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">跟灯亮顺序进行比较</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>If Correct <SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">如果</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">顺序正确的话</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Compare NoteCount to Score<SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">计分</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>If NoteCount &gt; Score <SPAN style="mso-tab-count: 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">如果比分数大</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>save score<SPAN style="mso-tab-count: 7">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">给计分赋值</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Compare NoteCount to LastNote<SPAN style="mso-tab-count: 1">&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">判断猜数是否是最后一个</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>If Done<SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">如果全部猜完</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Turn light off<SPAN style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">关闭灯亮</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Increase Timing speed<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">增加速度</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Exit Input loop<SPAN style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">退出输入循环</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>If Not Done<SPAN style="mso-tab-count: 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">如果还没有猜完</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> <SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Increment NoteCount<SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">增加计时，开始猜下一个</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Continue Input loop<SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">继续等待键盘输入</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>If Not Correct<SPAN style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">如果猜测的顺序不正确</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Exit Input Loop<SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">退出输入等待</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Exit Game loop<SPAN style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">退出游戏循环</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">*/<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">如果你没有理解上面的结构和顺序，不要紧，我们还是看看具体的代码就清楚了。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"><o:p>&nbsp;</o:p></SPAN></P><br><br>打喷嚏链接：<a href='http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4817' target=_blank>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4817</a>
<br><br><P><STRONG>喷嚏网图书推荐：</STRONG><A href='http://www.amazon.cn/?source=dapenti' target=_blank><U><FONT size=2>卓越网</FONT></U></A><FONT size=2>&nbsp;&nbsp;</FONT><A href='http://www.dangdang.com/?source=dapenti' target=_blank><U><FONT size=2>当当网</FONT></U></A></P><FONT size=2>
<P><A href='http://www.amazon.cn/gp/product/B003SLE38I?ver=gp&ref_=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20861421&ref=search-0-A' target=_blank><FONT size=2>韩寒:独唱团(第1辑) (当当) </FONT></A>
<P><A href='http://www.amazon.cn/%E5%B0%98%E4%B8%96%E2%80%A2%E6%8C%BD%E6%AD%8C-%E9%87%8E%E5%A4%AB/dp/B003L21YZY/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>野夫：尘世•挽歌 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20828206&ref=search-0-A' target=_blank><FONT size=2>野夫：尘世•挽歌 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp/ref=sr_1_4?_encoding=UTF8&s=books&qid=1280559863&asin=B003UV9XYK&sr=8-4&source=dapenti' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (卓越) </FONT></A>&nbsp;&nbsp;&nbsp;&nbsp;<A href='http://union.dangdang.com/transfer/transfer.aspx?from=P-267767&backurl=http://product.dangdang.com/product.aspx?product_id=20888735&ref=search-0-A' target=_blank><FONT size=2>历史是个什么玩意儿4:袁腾飞说世界史下 (当当) </FONT></A>
<P><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20884&amp;source=dapenti' target=_blank><FONT size=2>罗永浩：我的奋斗</FONT></A><FONT size=2>&nbsp;&nbsp;|&nbsp;&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh72755&source=dapenti' target=_blank><FONT size=2>1Q84</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003P2W4JA&source=dapenti' target=_blank><FONT size=2>佛祖在一号线</FONT></A>&nbsp;<FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh20882&source=dapenti'><FONT size=2>给你一个亿:你能干什么</FONT></A></P>
<P><A href='http://www.amazon.cn/%E4%B9%94%E5%B8%83%E6%96%AF%E7%9A%84%E9%AD%94%E5%8A%9B%E6%BC%94%E8%AE%B2-%E5%8D%A1%E8%BF%88%E6%81%A9%C2%B7%E5%8A%A0%E6%B4%9B/dp/B003TQKPCU/ref=pd_bxgy_b_img_a&source=dapenti' target=_blank><FONT size=2>乔布斯的魔力演讲</FONT></A><FONT size=2>&nbsp;&nbsp; |&nbsp;</FONT><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B003U5T5IA&source=dapenti' target=_blank><FONT size=2>将才:让年轻人少奋斗5年</FONT></A><FONT size=2> | </FONT><A href='http://www.amazon.cn/mn/detailApp?prodid=bkbkh70412&amp;source=dapenti' target=_blank><FONT size=2>杜拉拉3:我在这战斗的一年里</FONT></A></P>
<P><A href='http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-6610129-7440251&asin=B001CD51NA&source=dapenti' target=_blank>美国语文(12-18岁)(中英文对照版)</A>&nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk916933&amp;source=dapenti' target=_blank><FONT size=2>好妈妈胜过好老师</FONT></A> &nbsp;|&nbsp;<A href='http://www.amazon.cn/mn/detailApp?prodid=bkbk742219&source=dapenti' target=_blank><FONT size=2>如何说孩子才会听怎么听孩子才肯说</FONT></A></P>
<br><br><a href='http://www.vancl.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vancl.com/' target='_blank'><img src='http://union.vancl.com/adpic.aspx?w=360&h=120' border='0' /></a><a href='http://www.vjia.com/WebSource/WebSource.aspx?source=dapenti&url=http://www.vjia.com/' target='_blank'><img src='http://union.vjia.com/adpic.aspx?w=300&h=120' border='0' /></a>
<br><br>用手机上<a href='http://www.dapenti.com' target=_blank>喷嚏网</a>：m.dapenti.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周精华尽在【<a href='http://www.dapenti.com/blog/blog.asp?subjectid=126&name=dapenti' target=_blank>喷嚏周刊</a>】
]]></description>
</item><item>
<title><![CDATA[KPL游戏示例讲解[18-1]: 猜顺序]]></title>
<link>http://www.dapenti.com/blog/more.asp?name=KPLer&amp;id=4816</link>
<author>KPLer</author>
<pubDate>Sun, 24 Jun 2007 15:38:00 +0800</pubDate>
<description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">KPL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">游戏示例讲解</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">[18]:</FONT></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'">猜顺序</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 黑体; mso-hansi-font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-hansi-theme-font: major-fareast">代码：</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt">simon</SPAN><SPAN lang=EN-US style="FONT-FAMILY: 黑体; mso-hansi-font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-hansi-theme-font: major-fareast">.kpl<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 黑体; mso-hansi-font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-hansi-theme-font: major-fareast">位置：<SPAN lang=EN-US>KPL Programs</SPAN>的<SPAN lang=EN-US>Games</SPAN>下<SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-FAMILY: 黑体; mso-hansi-font-family: 宋体; mso-bidi-font-size: 1