首页>计算机>软件水平考试>复习指导>正文
计算机英语:BASIC语言入门

www.zige365.com 2008-11-24 23:02:26 点击:发送给好友 和学友门交流一下 收藏到我的会员中心
How to Use BASIC
Getting Started in BASIC   
  The best way to learn the computer language into do, and you will learn much quicker if you dare to make mistakes.Don't worry about breaking the computer by mistyping something. The computer can take care of itself If you have questions about how BASIC will respond to a particular instruction, try it and sec.   
  Each instruction has a particular format, or syntax. If you do not follow the correct syntax, BASIC will usually display an error message. You can then reenter the instruction correctly。
  
  At first, you need to know both to get into BASIC and ho-, N, to get out. Once you have learned some BASIC, you may begin to type. After you type alien the computer will wait for you to type a signal that you arc finished with the line. You give this signal by tapping the [Enter] key.This key is usually a large one located to the right of the alphabetic keyboard. It is similar in purpose and in placement to the carriage [Enter] key on a typewriter. 
 
  As You type, You'll notice a blinking light on the screen that indicates where the next character will appear. This is the cursor. When you press [Enter],the cursor moves to the beginning of the next line.The cursor always lets you know where you are on the screen.   
  Let's try using BASIC as a calculator. We do this by using the PRINT statement,     
  PRINT 3     
  3   
  We typed PRINT followed by a space, the digit3,and pressed [Enter].BASIC responded by display-in the digit 3.
    
  PRINT 2+2     
  4   
  We typed PRINT followed by a space and the numeric expression 2+2.BASIC evaluated the expressions and displayed the result. Here is another example:   
  PRINT 3,2+2     
  34   
  When we tap [Enter],we tell the BASIC Interpreter to check our command for errors and, if none are found, translate the command into machine language and execute. All that happens at great speed! Let’s try a few more examples.
   
  We can make BASIC type two values on online by placing a comma between calculations.   
  PRINT 1,2,3,4,5     
  12345   
  PRINT I,2,3,4,5     
  12345   
  Notice what happened:BASIC divided the display line into print zones.These print zones are commonly spaced columns apart, creating five print zone son an 80-column screen.(The exact number will depend on the dialect.)The comma between the values causes BASIC to skip to the next print zone for each value. By using commas,we can print output in neat columns. The extra spaces between values on the PRINT line, as in the second example, do not affect the spacing of the output。   
  Numeric values are displayed with a minus signing front if the value is negative and a space in front if the value is positive.In most dialects they are also followed by a space.

本新闻共3页,当前在第1页  1  2  3  

我要投稿 新闻来源: 编辑: 作者:
相关新闻
计算机软考辅导如何提高SQLServer的安全性(下)
计算机软件水平考试综合辅导:公平考核的边界机制
软件水平考试:.NET应用程序如何披上XP的外衣?
2009年计算机软件水平考试报名信息汇总
网络技术仿真试题第二套答案