求助贴——搜神贴
pascal吧
全部回复
仅看楼主
level 12
🍀Yuuki 楼主
各位大神
question1:怎样让pascal每隔一段固定时间输出语句。
question2:怎样让先前输出过在黑底白字的界面上的字消失(或做到类似效果)
question3:求大神讲解一下图形语句[委屈][委屈][委屈]感激不尽
2014年04月27日 04点04分 1
level 12
🍀Yuuki 楼主
自顶
2014年04月27日 05点04分 3
level 13
Q1:uses crt;delay(毫秒)
Q2:uses crt;clrscr;清屏
Q3:uses graph;资料自行百度
2014年04月27日 05点04分 4
十分感谢 给您三十二个赞
2014年04月27日 05点04分
level 12
🍀Yuuki 楼主
额 话说我没有学过任何use语句 可否给一个程序示范一下谢谢@Fallen_Breath
2014年04月27日 05点04分 5
level 13
uses crt;
var s:string;
begin
readln(s);
repeat
clrscr;
delay(500);
writeln(s);
delay(500);
until false;
end.
2014年04月27日 05点04分 6
level 12
🍀Yuuki 楼主
万分感谢
2014年04月27日 05点04分 7
level 12
🍀Yuuki 楼主
PS question:clrscr 这种语句一定要在uses crt 中使用么?
2014年04月27日 08点04分 8

2014年04月27日 14点04分
level 12
🍀Yuuki 楼主
help help 有木有人那
2014年04月27日 08点04分 9
level 9
15、Function ReadKey : Char;
ReadKey从键盘缓冲区读取一个键并返回。如果功能键被按下,则返回0(ASCII码),
如果执行该函数后并未有键按下,则程序将一直等到有键按下才继续执行下面的
代码。Linux下的键盘映射可能会导致错误并由ReadKey报告,因此需谨慎使用
ReadKey。
例子:
Program Example3;
uses Crt;
{ Program to demonstrate the ReadKey function. }
var
ch : char;
begin
writeln('PressLeft/Right, Esc=Quit');
repeat
ch:=ReadKey;
case ch of
#0 : begin
ch:=ReadKey; {Read ScanCode}
casech of
#75 : WriteLn('Left');
#77: WriteLn('Right');
end;
end;
#27 :WriteLn('ESC');
end;
until ch=#27{Esc}
end.
16、Procedure Sound (hz : word);
使扬声器发出hz赫兹的声音。在Windows下,系统播放声音的频率参数被忽略。
(意思好像是播放的声音的频率和参数有点差距)在在其他操作系统下,此过
程可能不会执行。
17、ProcedureTextBackground (CL: Byte);
TextBackground根据参数CL设置背景颜色(执行后输入输出文本的),CL为预定
的颜色常量之一。
例子:
Program Example13;
uses Crt;
{ Program to demonstrate the TextBackground function.}
begin
TextColor(White);
WriteLn('Thisis written in with the default background color');
TextBackground(Green);
WriteLn('Thisis written in with a Green background');
TextBackground(Brown);
WriteLn('Thisis written in with a Brown background');
TextBackground(Black);
WriteLn('Backwith a black background');
end.
18、Procedure TextColor (CL: Byte);
TextColor根据CL设置前景色(执行后输入输出文本的颜色),CL为预定的颜色
常量之一。
例子:
Program Example12;
uses Crt;
{ Program to demonstrate the TextColor function. }
begin
WriteLn('Thisis written in the default color');
TextColor(Red);
WriteLn('Thisis written in Red');
TextColor(White);
WriteLn('Thisis written in White');
TextColor(LightBlue);
WriteLn('Thisis written in Light Blue');
end.
19、procedure TextMode(Mode: Integer);
TextMode设置屏幕文本模式(即屏幕的行和列数),较低的字节是用于设置VGA文本
模式。这个过程只在DOS下执行。
20、Function WhereX : Byte;
WhereX返回当前光标的横坐标(相对于当前窗口)。
例子:
Program Example7;
uses Crt;
{ Program to demonstrate the WhereX and WhereYfunctions. }
begin
Writeln('Cursor postion: X=',WhereX,' Y=',WhereY);
end.
21、Function WhereY : Byte;
WhereY返回当前光标的纵坐标(相对于当前窗口)。
例子:
Program Example7;
uses Crt;
{ Program to demonstrate the WhereX and WhereYfunctions. }
begin
Writeln('Cursor postion: X=',WhereX,' Y=',WhereY);
end.
22、Procedure Window (X1, Y1, X2, Y2:Byte);
Window在屏幕上创建一个窗口(即一块区域),X1、Y1为窗口的起始坐标,X2、
Y2为窗口的结束坐标。执行后光标自动转到X1、Y1处。
例子:
Program Example5;
uses Crt;
{ Program to demonstrate the Window function. }
begin
ClrScr;
WriteLn('Creating a window from 30,10 to 50,20');
Window(30,10,50,20);
WriteLn('Weare now writing in this small window we just created, we '+
'can''t get outside it when writing long lines like this one');
Write('Pressany key to clear the window');
ReadKey;
ClrScr;
Write('Thewindow is cleared, press any key to restore to fullscreen');
ReadKey;
{Full Screen is 80x25}
Window(1,1,80,25);
Clrscr;
Writeln('Backin Full Screen');
end.
2014年04月28日 03点04分 11
真正的大神啊楼主佩服佩服 万分感谢
2014年04月30日 09点04分
1