亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? pasl1001.html

?? This is programing tutorial for people who wants to know programing in PASCAL.Pascal might be not th
?? HTML
字號:
<HTML>

<head>
<LINK href="../style.css" rel="stylesheet" type="text/css">
<TITLE>Pascal Tutorial - Chapter 2</TITLE>
</head>

<BODY background="../tile01.jpg">
<H1><CENTER>Let's Extend !</CENTER></H1>

<H3>Hi !</H3>
<P>

We meet again ! Glad to see you ! Now, let's extend our first program  with
a little variation.  <TT>
Crt</TT>  unit does not consist of  <TT>Clrscr</TT>  only. It has a lot of interesting functions
and procedures. The ones we will discuss this time are :</P>
<OL>
<LI><TT>TextColor</TT>  and  <TT>TextBackGround</TT></LI>
<LI><TT>TextAttr</TT></LI>
<LI><TT>GotoXY</TT></LI>
<LI><TT>TextMode</TT></LI>
<LI><TT>Sound</TT>,  <TT>Delay</TT>, and
   <TT>NoSound</TT></LI></OL>
<P>

This chapter is intended to add your interests in programming so the lesson
wouldn't be so tiresome. If you want to skip this chapter it's OK since  it
has no important thing to spot. But beware that every jargon and commands I
use in this lesson will be brought to the next ones.</P>

<P>

OK ! Let's give color to our text on screen ! We use  <TT>Crt</TT>  unit's procedures:

<TT>TextColor</TT>  and  <TT>TextBackGround</TT>. Both accepts value ranging 0 to 15. Example :
</P><PRE>
<TT>TextColor(14);
TextBackground(1);</TT>
</PRE><P>


It will set the foreground color to yellow and blue background for the next 
<TT>Write</TT> 
 or 
 <TT>Writeln</TT>. Yep ! Easy ! Let's look at full example :

</P><HR><PRE>uses crt;

begin
  TextColor(14);
  TextBackGround(1);
  Writeln('Hello there !');
end.</PRE><HR><P>

Run it and see what happens.</P><P>



O ho ! That's great ! Yellow over Blue. Try to figure all color values !
A lot of variation could be applied and it's all yours to choose.
There's even more convenient than above : Use <TT>TextAttr</TT>   instead. It's a kind
of a 'combo' variable. You just assign a value that is :</P>
<PRE>        (background * 16)+foreground</PRE>
<P>

Suppose  you want a cyan background (or light blue), the number is  3,  and
black foreground, that is 0. So you would write this:</P>
<PRE>
        TextAttr:=(3*16)+0;</PRE><P>
<P>

Then, subsequent writes on screen will be in black over cyan. Easy, eh ?
</P><P>

If you clear screen AFTER you assign colors, you will found that the entire
screen will be wiped to the last assigned color. Suppose you have set color
black  over cyan, if you clear the screen, the entire screen will be  black
over cyan ! It's useful if you want alternative background instead of black
-- It's boring. Yeah ! Easy !
</P><P>

Want to have big characters on screen ? Try adding <TT>TextMode(CO40);</TT>.
 Well,
<TT>TextMode</TT>   is used for changing text mode. Valid values to pass is <TT>CO80</TT>,
 that
is for return back to normal mode, or <TT>LastMode</TT>   -- that is back to last mode
visited, and refer help for more information! Example :</P>
<HR><PRE>uses crt;

begin
  TextMode(CO40);
  Writeln('A Real BIG Characters on screen !');
  Readln;
  TextMode(CO80);
  Writeln('Back to normal');
  Readln;
end.</PRE><HR><P>

Before we continue, I would like to introduce the screen behavior of PCs in
text  mode. Screen has a resolution. In text mode, screen has either 80  or
40 horizontal resolution (generally) and 25 vertical resolution. It  means,
the screen could be 80 cols by 25 lines or 40 cols by 25 lines. The setting
of   <TT>TextMode</TT>    reflects to this :  <TT>CO40</TT>  -- sets the screen to  40  characters
wide and 25 lines -- and  <TT>CO80</TT>  -- sets the screen to 80 characters wide  and
25 lines too. 40 characters wide causes the screen to "stretch" horizontally,
so in result, WIDE characters appear on screen.</P>
<P>

EGA  and VGA has a special feature that is also supported by  <TT>crt</TT>  unit :  an
enhanced text mode consists of 43 (when EGA) or 50 lines, instead of 25. We
put the value  <TT>Font8x8</TT>  inside  <TT>TextMode</TT>  parameter.</P>
<P>

We can also directs our text output at specified location by using   <TT>GotoXY</TT>.
It  accepts  parameters X and Y (both are bytes). Note that X  reflects  to
column position, and Y reflects to line position. Both X and Y must not
exceed the range of the current text mode.

Run and view this program  <TT>GOTOXY.PAS</TT>  to see what's going.</P>
<HR><PRE>uses crt;

Begin
  TextMode(CO40);
  GotoXY(8,12);
  Writeln('At 8,12');
  Readln;
  GotoXY(35,8);
  Writeln('At 35,8');
  Readln;
  GotoXY(40,20);
  Writeln('At 40,20');
  Readln;
  GotoXY(30,30);
  Writeln('Guess');
  Readln;
  TextMode(CO80);
  Writeln('Back to normal');
End.</PRE><HR><P>

Now,  let' s play with sounds ! It's easy ! Start playing  the  sound  with
<TT>Sound</TT>, <TT>delay</TT> for several times, then  <TT>NoSound</TT>. Let's practice !

Cut and paste this program. Run it in BP.</P><HR><PRE>uses crt;
begin
  Sound(440); Delay(100); NoSound;
  Sound(550); Delay(100); NoSound;
end</PRE><HR><P>

<TT>Sound</TT>  accepts frequency number and it's a word. It is the value of frequency
you  want to play.  <TT>Delay</TT>  accepts value of words. It reflects  how  many
milliseconds (<sup>1</sup>/<sub>100</sub><sup>th</sup> of a second) you want to delay.
 <TT>NoSound</TT>  tells the  PC
to  stop playing the note. If you omit  <TT>Delay</TT>, you may not hear any  voices.
Try it and figure it out !</P>

<P>

Pascal  is  able to calculate things and it made programming  much  easier.
OK guys, here is the convention:</P>
<UL>
<LI>Addition (+), Subtraction(-), and Multiplication(*) :
  <dl>
<DD>If both numbers are integers, it yields an integer result. Otherwise,  even
there's only one is real, the result becomes real.</DD>
<UL>
<LI>integer with integer = integer</LI>
<LI>integer with real    = real</LI>
<LI>real    with real    = real</LI></UL>


  </dl>


<LI>Division(/) : Always yields real result.</LI>

<LI>Special Division (<TT>Div</TT>) :
It's quite the same as (/), but it always yields integer result.</LI>
</UL>

Fine, fine. But how can I apply this ?
<CENTER><TABLE WIDTH=60% BORDER=2>
<TR><TH>Real life equation</TH><TH>Becomes</TH></TR><TR>
<TD>y = 5 x 3</TD><TD>y:=5*3;   (y is either integer or real)</TD></TR><TR>
<TD>z = 5 + 4 x 3</TD><TD>z:=5+4*3; (z is either integer or real)</TD></TR><TR>
<TD>a = 3.14 x 7 x 7</TD><TD>a:=3.14*7*7; (a is always real)</TD></TR><TR>
<TD>b = 14 x (5 + a)</TD><TD>b:=14*(5+a);<BR>
(b depends on a, if a real, b is always real. If a integer, b may be real or integer).</TD></TR>
</TABLE></CENTER><P>

Yeah, that's quite an example. But you should know it though. How about the
special division :</P>
<TABLE BORDER=1><TR><TD>

a:=22/7;</TD><TD>when a is real, it yields result 3.142856 .... so on
otherwise, error.</TD></TR><TR><TD>

b:=22 div 7;</TD><TD>b is always integer, and it hold 3.
       <TT>Div</TT>  always round to the
floor, I mean not to the top nor not to the nearest integer.Even 98  <TT>div</TT>  3
will result 32 though normal people consider 32.66666666..... to 33.
</TD></TR>
</TABLE><P>

Pascal could convert the  <TT>real</TT>  numbers to integers using
 <TT>Trunc</TT>  and  <TT>Round</TT>. 
<TT>Trunc</TT>  behaves similarly like  <TT>Div</TT>, it rounds to the floor always.
 <TT>Round</TT>  is
more  moderate though, it rounds to the nearest integer. Evaluate the
expressions below and see the result.</P>
<HR><PRE>uses crt;
begin
  Clrscr;
  Writeln(Trunc(12.31));
  Writeln(Round(12.31));
  Writeln(Trunc(31.49));
  Writeln(Round(31.49));
  Writeln(Trunc(44.59));
  Writeln(Round(44.59));
  Readln;
end;</PRE><HR>
<P>

OK ! That's all for now ! Shall we have the <A HREF="pasq1001.html">
quiz</A> ?</P>
<hr><B><H3>Where to go ?</H3></B>
<p>
<A HREF="../news.html">Back to main page</A><BR>
<A HREF="pasles01.html">Back to Pascal Tutorial Lesson 1 contents</A><BR>
<A HREF="pasq1001.html">To the quiz</A><BR>
<A HREF="pasl1000.html">Back to Chapter 1</A>, 'Hello, World !'<BR>
<A HREF="pasl1002.html">To Chapter 3</A> about branching (<TT>IF</TT>)<BR>
<A HREF="../mylink.html">My page of programming link</A><BR>
<a HREF="../faq.html">Contact me</a></P>
<hr><P class="cpy">By : Roby Joehanes, &copy; 1996, 2000</P>
</BODY></HTML>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产亚洲欧洲997久久综合 | 成人看片黄a免费看在线| 亚洲天堂av老司机| 日韩三级视频在线看| 91丝袜美女网| 国产91丝袜在线播放九色| 亚洲综合色自拍一区| 国产欧美久久久精品影院| 欧美日本高清视频在线观看| 风间由美一区二区三区在线观看| 午夜久久久久久久久| 亚洲另类色综合网站| 国产丝袜在线精品| 日韩一区二区麻豆国产| 欧美特级限制片免费在线观看| 成人免费电影视频| 国产酒店精品激情| 美国一区二区三区在线播放| 亚洲一区二区三区四区在线观看 | 亚洲视频一区在线观看| 久久综合精品国产一区二区三区 | 中文字幕日韩一区二区| 久久亚洲一区二区三区明星换脸 | 69堂亚洲精品首页| 在线一区二区视频| 91亚洲精华国产精华精华液| 成人性生交大合| 国产成人在线观看免费网站| 狠狠色狠狠色综合| 精品一区二区三区日韩| 另类专区欧美蜜桃臀第一页| 日韩高清在线不卡| 五月婷婷激情综合| 亚洲午夜一区二区三区| 亚洲国产综合91精品麻豆| 樱花草国产18久久久久| 亚洲精品第1页| 亚洲精品欧美专区| 亚洲精品成人a在线观看| 夜夜爽夜夜爽精品视频| 亚洲v日本v欧美v久久精品| 亚洲线精品一区二区三区| 午夜精品影院在线观看| 日韩中文字幕av电影| 午夜成人免费电影| 日韩成人av影视| 久草在线在线精品观看| 国产一区二区三区香蕉| 国产成人午夜片在线观看高清观看 | 国产精品不卡视频| 亚洲免费在线看| 亚洲综合小说图片| 免费一级欧美片在线观看| 久久av资源网| 国产成人小视频| 91小视频在线免费看| 欧美亚洲精品一区| 91精品在线麻豆| 久久影视一区二区| 最好看的中文字幕久久| 亚洲自拍与偷拍| 美国十次综合导航| 床上的激情91.| 色欧美日韩亚洲| 777亚洲妇女| 久久久久久夜精品精品免费| 欧美高清在线精品一区| 亚洲欧美日韩在线不卡| 丝袜亚洲另类丝袜在线| 国产一二精品视频| 91黄视频在线| 日韩一级高清毛片| 国产精品丝袜一区| 午夜精品影院在线观看| 国产精品自拍三区| 在线观看不卡一区| 精品成人免费观看| 亚洲女同ⅹxx女同tv| 男女激情视频一区| 91偷拍与自偷拍精品| 欧美一级片在线| 综合自拍亚洲综合图不卡区| 婷婷丁香久久五月婷婷| 成人综合在线观看| 8x8x8国产精品| 久久精品人人做| 日韩精品一二三区| 99久久综合精品| 日韩免费观看高清完整版在线观看| 欧美国产一区二区在线观看| 亚州成人在线电影| 成人成人成人在线视频| 欧美一区二区精品在线| 亚洲欧洲日韩女同| 激情偷乱视频一区二区三区| 91福利在线观看| 日本一区二区成人| 蜜臀av性久久久久蜜臀aⅴ流畅| av欧美精品.com| 久久新电视剧免费观看| 日本成人在线视频网站| 日本精品裸体写真集在线观看| 久久精品一区二区三区av| 男女视频一区二区| 欧美中文一区二区三区| 国产精品国产三级国产aⅴ原创| 美国三级日本三级久久99| 在线观看91精品国产入口| 日本一区二区视频在线观看| 男女男精品视频| 欧美日精品一区视频| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 亚洲一区在线观看视频| 成人福利在线看| 久久久综合精品| 奇米影视一区二区三区| 欧美日韩亚州综合| 亚洲日本va午夜在线影院| 国产精品香蕉一区二区三区| 日韩欧美你懂的| 日韩国产欧美在线播放| 欧美伊人精品成人久久综合97 | 亚洲国产精品t66y| 国产一区二区伦理| 欧美电影免费观看高清完整版| 亚洲国产成人av| 欧美日韩日本视频| 亚洲高清视频在线| 色婷婷激情综合| 亚洲免费看黄网站| 91年精品国产| 亚洲精品日韩综合观看成人91| av电影一区二区| 伊人性伊人情综合网| 91麻豆免费在线观看| 亚洲欧美一区二区三区久本道91| 成人av网站在线观看免费| 中文乱码免费一区二区| 粉嫩绯色av一区二区在线观看| 国产日韩欧美不卡在线| 成人精品亚洲人成在线| **性色生活片久久毛片| 99re这里都是精品| 亚洲精品久久久久久国产精华液| 91丝袜呻吟高潮美腿白嫩在线观看| 亚洲摸摸操操av| 欧美日韩国产成人在线91| 日韩和欧美一区二区三区| 日韩欧美一区二区在线视频| 麻豆国产精品官网| 久久精品一区二区三区不卡牛牛| 国产成人免费视频网站| 亚洲人精品一区| 欧美久久久一区| 精品中文字幕一区二区小辣椒| 久久综合色鬼综合色| www.日本不卡| 亚洲午夜电影网| 日韩美女在线视频 | 成人污视频在线观看| 亚洲日穴在线视频| 欧美高清视频一二三区| 另类小说图片综合网| 日本一区二区三区四区在线视频| 99久久伊人久久99| 性感美女极品91精品| 精品精品欲导航| av网站免费线看精品| 天天做天天摸天天爽国产一区| 日韩精品中文字幕一区| 成人av在线影院| 天天色综合成人网| 中文天堂在线一区| 欧美区视频在线观看| 国产一区二区三区国产| 亚洲三级免费观看| 精品久久久久香蕉网| 91免费国产在线| 久久99久久精品| 亚洲另类一区二区| 亚洲精品在线免费观看视频| 色综合天天在线| 激情欧美一区二区| 亚洲国产综合色| 国产精品久久久久一区二区三区共| 欧美午夜电影一区| 国产成a人亚洲精| 日韩va亚洲va欧美va久久| 自拍偷拍亚洲综合| 精品1区2区在线观看| 欧美日韩日日摸| 99久久精品免费看国产免费软件| 日韩国产在线一| 亚洲激情网站免费观看| 毛片av一区二区| |精品福利一区二区三区| 精品国产一二三区| 欧美日韩另类一区| 99久久伊人网影院| 国产一区二区三区免费播放|