ΔΙΑΔΙΚΑΣΙΕΣ ΚΑΙ ΣΥΝΑΡΤΗΣΕΙΣ ΤΗΣ TURBO PASCAL

Page 1

ÄÉÁÄÉÊÁÓÉÅÓ &

ÓÕÍÁÑÔÇÓÅÉÓ ÔÇÓ

TURBO PASCAL

Áè. Å. Êïõôóïíéêüëáò

Ëáìßá 1993



Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

Ð Å Ñ É Å × Ï Ì Å Í Á

Abs Addr Append Arc ArcTan Assign AssignCrt Bar Bar3D BlockRead BlockWrite ChDir Chr Circle ClearDevice ClearViewPort Close CloseGraph ClrEol ClrScr Concat Copy Cos CSeg Dec Delay Delete DelLine DetectGraph DiskFree DiskSize Dispose DosExitCode DosVersion DrawPoly DSeg Ellipse EnvCount EnvStr Eof Eoln Erase Exec Exit Exp FExpand FilePos FileSize FillChar FillElipse FillPoly FindFirst FindNext FloodFill Flush Frac FreeMem

1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 7 7 7 7 8 8 8 8 8 9 9 9 9 10 10 10 10 10 11 11 12 12 12 12

FSearch FSplit GetArcCoords GetAspectRatio GetBkColor GetCBreak GetColor GetDate GetDefaultPalette GetDir GetDriverName GetEnv GetFAttr GetFillPattern GetFillSettings GetFTime GetGraphMode GetImage GetIntVec GetLineSettings GetMaxColor GetMaxMode GetMaxX GetMaxY GetMem GetModeName GetModeRange GetPalette GetPaletteSize GetPixel GetTextSettings GetTime GetVerify GetViewSettings GetX GetY GoToXY GraphDefaults GraphErrorMsg GraphResult Halt Hi HighVideo ImageSize Inc InitGraph Insert InsLine InstallUserDriver InstallUserFont Int Intr IOResult Keep KeyPressed Length Line LineRel

12 13 13 13 13 14 14 14 14 15 15 15 15 15 16 16 16 16 17 17 17 17 17 18 18 18 18 18 19 19 19 19 20 20 20 20 20 21 21 21 21 22 22 22 22 22 23 23 23 23 24 24 24 25 25 25 25 25


Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

Ð Å Ñ É Å × Ï Ì Å Í Á

LineTo Ln Lo LowVideo Mark MaxAvail MemAvail MkDir Move MoveRel MoveTo MsDos New NormVideo NoSound Odd Ofs Ord OutText OutTextXY OvrClearBuf OvrGetBuf OvrInit OvrInitEMS OvrSetBuf PackTime ParamCount ParamStr Pi PieSlice Pos Pred Ptr PutImage PutPixel Random Randomize Read ReadKey Readln Rectangle RegisterBGIdriver RegisterBGIfont Release Rename Reset RestoreCrtMode Rewrite RmDir Round RunError Sector Seek SeekEof SeekEoln Seg SetActivePage SetAllPalette

25 26 26 26 26 26 26 27 27 27 27 27 27 28 28 28 28 28 28 29 29 29 29 29 30 30 30 30 30 30 31 31 31 31 32 32 32 32 32 33 33 33 33 34 34 34 34 34 35 35 35 35 35 36 36 36 36 36

SetAspectRatio SetBkColor SetCBreak SetColor SetDate SetFAttr SetFillPattern SetFillStyle SetFTime SetGraphBufSize SetGraphMode SetIntVec SetLineStyle SetPalette SetRBGPalette SetTextBuf SetTextJustify SetTextStyle SetTime SetUserCharSize SetVerify SetViewPort SetVisualPage SetWriteMode Sin SizeOf Sound SPtr Sqr Sqrt SSeg Str Succ Swap SwapVectors TextBackground TextColor TextHeight TextMode TextWidth Trunc Truncate TypeOf UnPackTime UpCase Val WhereX WhereY Window Write Writeln

37 37 37 37 37 38 38 38 38 39 39 39 39 40 40 40 40 41 41 41 42 42 42 42 42 43 43 43 43 43 43 43 44 44 44 44 44 45 45 45 45 46 46 46 46 46 47 47 47 47 47


-1Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

Abs

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Abs(X: integer Þ real): (Éäéïõ ôýðïõ ìå ôï üñéóìá); ÅðéóôñÝöåé ôçí áðüëõôç ôéìÞ ôïõ ïñßóìáôïò X. Ôï áðïôÝëåóìá ôçò óõíÜñôçóçò Ý÷åé ôïí ßäéï ôýðï (integer Þ real) ìå ôï üñéóìá.

Addr

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Addr(M): pointer; ÅðéóôñÝöåé ôç äéåýèõíóç óôç ìíÞìç ìéáò ìåôáâëçôÞò, ìéáò óôáèåñÜò ìå ôýðï Þ ìéáò äéáäéêáóßáò. Ôï áðïôÝëåóìá åßíáé ôýðïõ äåßêôç (Pointer)  ë Ý ð å : Ofs, Ptr,Seg

Append

(Äéáäéêáóßá)

Ó ý í ô á î ç : Append(var F: text); Áíïßãåé Ýíá õöéóôÜìåíï áñ÷åßï êåéìÝíïõ ãéá ðñïóèÞêç êáé ôïðïèåôåß ôï äåßêôç óôï ôÝëïò ôïõ áñ÷åßïõ.  ë Ý ð å : Assign, Close, Reset, Rewrite

Arc

(Äéáäéêáóßá)

Ó ý í ô á î ç : Arc(X,Y: integer; StAngle, EndAngle, Radius: word); Ó÷åäéÜæåé Ýíá êõêëéêü ôüîï ìå áêôßíá Radius, áðü ôç ãùíßá áñ÷Þò (StAngle) ìÝ÷ñé ôç ãùíßá ôÝëïõò (EndAngle), ÷ñçóéìïðïéþíôáò ôï óçìåßï (X,Y) ùò êÝíôñï. Ïé ãùíßåò ðñÝðåé íá åêöñÜæïíôáé óå ìïßñåò. Ì ï í Ü ä á : Graph  ë Ý ð å : Circle, Ellipse, GetArcCoords, GetAspectRatio, PieSlice

ArcTan

(ÓõíÜñôçóç)

Ó ý í ô á î ç : ArcTan(R: real): real; ÅðéóôñÝöåé ôï ôüîï (ãùíßá) åöáðôïìÝíçò áêôßíéá.  ë Ý ð å : Sin, Cos

Assign

ôïõ

ïñßóìáôïò

R,

óå

(Äéáäéêáóßá)

Ó ý í ô á î ç : Assign(var F:filetype; Name: string); ÓõíäÝåé (åê÷ùñåß) ôï áñ÷åßï ìå üíïìá Name, ìå ôç ìåôáâëçôÞ áñ÷åßïõ F. Óôç óõíÝ÷åéá ïðïéáäÞðïôå åíÝñãåéá ôïõ ðñïãñÜììáôüò ìáò ãéá ôç ìåôáâëçôÞ áñ÷åßïõ F, ãßíåôáé ðÜíù óôï áñ÷åßï ðïõ êáèïñßæåôáé áðü ôï Name.  ë Ý ð å : Append, Close, Reset, Rewrite

Áè. Å. Êïõôóïíéêüëáò


-2Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

AssignCrt

(Äéáäéêáóßá)

Ó ý í ô á î ç : AssignCrt(var F: text); ÓõíäÝåé ôçí ïèüíç ìå ôç ìåôáâëçôÞ áñ÷åßïõ F. Åôóé åðéôñÝðåé óôïí ÷ñÞóôç, ãñÜöïíôáò óôçí F, íá óôÝëíåé ôçí Ýîïäï äåäïìÝíùí óôçí ïèüíç. Ì ï í Ü ä á : Crt

Bar

(Äéáäéêáóßá)

Ó ý í ô á î ç : Bar(X1, Y1, X2, Y2: integer); Ó÷åäéÜæåé ïñèïãþíéï ÷ñçóéìïðïéþíôáò ôïí åðéëåãìÝíï ôñüðï ãåìßóìáôïò êáé ÷ñùìáôéóìü. Ôï ðÜíù áñéóôåñü Üêñï ôïõ ïñèïãùíßïõ âñßóêåôáé óôç èÝóç (×1,Õ1) êáé ôï êÜôù äåîß óôçí (×2,Õ2). Ì ï í Ü ä á : Graph  ë Ý ð å : Bar3D, SetFillPattern, SetFillStyle, SetLineStyle

Bar3D

(Äéáäéêáóßá)

Ó ý í ô á î ç : Bar3D(X1, Y1, X2, Y2: integer; Depth: word; Top: boolean); Ó÷åäéÜæåé ôñéóäéÜóôáôï ïñèïãþíéï ÷ñçóéìïðïéþíôáò ôïí åðéëåãìÝíï ôñüðï ãåìßóìáôïò êáé ÷ñùìáôéóìü. Ôï ïñèïãþíéï ó÷åäéÜæåôáé ìå âÜèïò Depth óå êïõêêßäåò (pixels). Áí ç Top åßíáé áëçèÞò (TRUE), ôüôå ó÷åäéÜæåôáé ìéá ôñéóäéÜóôáôç ïñïöÞ ðÜíù áðü ôï ïñèïãþíéï. Ì ï í Ü ä á : Graph  ë Ý ð å : Bar, SetFillPattern, SetFillStyle, SetLineStyle

BlockRead

(Äéáäéêáóßá)

Ó ý í ô á î ç : BlockRead (var F: file; var Dest: type; NunRecs: integer; var RecsRead: integer); ÄéáâÜæåé NumRecs åããñáöÝò áðü ôç ìåôáâëçôÞ áñ÷åßïõ ÷ùñßò ôýðï F, óôçí ìåôáâëçôÞ ðñïóùñéíÞò áðïèÞêåõóçò Dest. Ç RecsRead äßíåé ôïí áñéèìü ôùí åããñáöþí ðïõ äéáâÜóôçêáí óôçí ðñáãìáôéêüôçôá.  ë Ý ð å : BlockWrite

BlockWrite

(Äéáäéêáóßá)

Ó ý í ô á î ç : BlockWrite(var F: file; var Dest: type; NunRecs: integer); ÃñÜöåé NumRecs åããñáöÝò áðü ôç ìåôáâëçôÞ ðñïóùñéíÞò áðïèÞêåõóçò Dest, óôçí ìåôáâëçôÞ áñ÷åßïõ ÷ùñßò ôýðï F.  ë Ý ð å : BlockRead

Áè. Å. Êïõôóïíéêüëáò


-3Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

ChDir

(Äéáäéêáóßá)

Ó ý í ô á î ç : ChDir(S: string); ÊÜíåé ôï S ôñÝ÷ïíôá êáôÜëïãï (current directory).  ë Ý ð å : GetDir, MkDir, RmDir

Chr

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Chr(B: byte): char; ÅðéóôñÝöåé ôï ÷áñáêôÞñá ASCII ðïõ áíôéóôïé÷åß óôï üñéóìá B.  ë Ý ð å : Ord

Circle

(Äéáäéêáóßá)

Ó ý í ô á î ç : Circle(X,Y: integer; Radius: word); Ó÷åäéÜæåé êýêëï ìå êÝíôñï ôï óçìåßï (X,Y) êáé áêôßíá ßóç ìå Radius (áêôßíá óå pixels êáôÜ ôçí ïñéæüíôéá êáôåýèõíóç). Ì ï í Ü ä á : Graph  ë Ý ð å : Arc, Ellipse, GetArcCoords, GetAspectRatio, PieSlice

ClearDevice

(Äéáäéêáóßá)

Ó ý í ô á î ç : ClearDevice; Êáèáñßæåé ôçí ïèüíç ãñáöéêþí êáé ôïðïèåôåß ôï äåßêôç ïèüíçò óôï óçìåßï (0,0). Ì ï í Ü ä á : Graph  ë Ý ð å : ClearViewPort, CloseGraph, InitGraph, RestoreCrtMode, SetGraphMode

ClearViewPort

(Äéáäéêáóßá)

Ó ý í ô á î ç : ClearViewPort; Êáèáñßæåé ôï ôñÝ÷ïí ðáñÜèõñï ïèüíçò. Ì ï í Ü ä á : Graph  ë Ý ð å : GetViewSettings, SetViewPort

Close

(Äéáäéêáóßá)

Ó ý í ô á î ç : Close(var F: filetype); Êëåßíåé Ýíá áíïéêôü áñ÷åßï F, áöïý ðñïçãïõìÝíùò êáèáñßóåé ôçí ðåñéï÷Þ ðñïóùñéíÞò áðïèÞêåõóçò. Áõôü óçìáßíåé ðùò ü,ôé äåäïìÝíá õðÜñ÷ïõí óôçí ìåôáâëçôÞ áñ÷åßïõ F, ãñÜöïíôáé óôï áñ÷åßï äßóêïõ ðïõ Ý÷åé ãßíåé Assign ìå ôçí F êáé áðåëåõèåñþíåôáé Ýíá ÷åéñéóôÞñéï áñ÷åßïõ ôïõ DOS.  ë Ý ð å : Append, Assign, Reset, Rewrite, Flush

Áè. Å. Êïõôóïíéêüëáò


-4Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

CloseGraph

(Äéáäéêáóßá)

Ó ý í ô á î ç : CloseGraph; Êëåßíåé ôï óýóôçìá ãñáöéêþí êáé åðáíáöÝñåé ôçí ïèüíç óôçí êáôÜóôáóç ðïõ âñéóêüôáí ðñéí áðü ôçí åßóïäï óôïí ôñüðï ëåéôïõñãßáò ãñáöéêþí. Åðßóçò åëåõèåñþíåé ôç ìíÞìç ðïõ ÷ñçóéìïðïéïýóå ôï óýóôçìá ãñáöéêþí. Ì ï í Ü ä á : Graph  ë Ý ð å : DetectGraph, InitGraph, RestoreCrtMode, SetGraphMode

ClrEol

(Äéáäéêáóßá)

Ó ý í ô á î ç : ClrEol; ÓâÞíåé üëïõò ôïõò ÷áñáêôÞñåò áðü ôç èÝóç ôïõ äñïìÝá ìÝ÷ñé ôï ôÝëïò ôçò ãñáììÞò ÷ùñßò íá ìåôáêéíçèåß ï äñïìÝáò. Ì ï í Ü ä á : Crt  ë Ý ð å : ClrScr, Window

ClrScr

(Äéáäéêáóßá)

Ó ý í ô á î ç : ClrScr; Êáèáñßæåé ôï åíåñãü ðáñÜèõñï êáé ôïðïèåôåß ôï äñïìÝá óôçí ðÜíù áñéóôåñÞ ãùíßá, èÝóç (1,1). Ì ï í Ü ä á : Crt  ë Ý ð å : ClrEol, Window

Concat

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Concat(S1 [, S2,..., Sn]: string): string; Óõíåíþíåé ìéá áêïëïõèßá óåéñþí ÷áñáêôÞñùí (strings) (S1, S2, ..., Sn) êáé ôá åðéóôñÝöåé ùò åíéáßá óåéñÜ ÷áñáêôÞñùí. Ôï ìÞêïò ôçò óõíåíùìÝíçò óåéñÜò ÷áñáêôÞñùí äåí ðñÝðåé íá åßíáé ðáñáðÜíù áðü 255 ÷áñáêôÞñåò. Ç ÷ñÞóç ôïõ ôåëåóôÞ "+" åðéóôñÝöåé ôï ßäéï áðïôÝëåóìá ìå áõôü ôçò Concat.  ë Ý ð å : Copy, Delete, Insert, Length, Pos

Copy

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Copy(S: string; Index: integer; Count: integer):string; ÅðéóôñÝöåé ôï ôìÞìá ôçò óåéñÜò ÷áñáêôÞñùí (string) S ðïõ áñ÷ßæåé áðü ôï ÷áñáêôÞñá óôç èÝóç Index êáé ðåñéëáìâÜíåé Count ÷áñáêôÞñåò.  ë Ý ð å : Concat, Delete, Insert, Length, Pos

Áè. Å. Êïõôóïíéêüëáò


-5Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

Cos

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Cos(R: real): real; ÅðéóôñÝöåé ôï óõíçìßôïíï ôïõ ïñßóìáôïò R. Ôï üñéóìá èá ðñÝðåé íá åßíáé ãùíßá (ôüîï) óå áêôßíéá.  ë Ý ð å : ArcTan, Sin

CSeg

(ÓõíÜñôçóç)

Ó ý í ô á î ç : CSeg: word; ÅðéóôñÝöåé ôçí ôñÝ÷ïõóá ôéìÞ ôïõ êáôá÷ùñçôÞ CS (Code Segment), ç ïðïßá ðåñéÝ÷åé ôç äéåýèõíóç ôçò áñ÷Þò ôïõ ôñÝ÷ïíôïò ôìÞìáôïò êþäéêá.  ë Ý ð å : DSeg, SSeg

Dec

(Äéáäéêáóßá)

Ó ý í ô á î ç : Dec(var X: scalar[, N: longint]); Ìåéþíåé ìéá âáèìùôÞ ìåôáâëçôÞ × êáôÜ ôçí ðáñáëçöèåß ôï Í, ôüôå åííïåßôáé ðùò åßíáé 1. Â ë Ý ð å : Inc, Pred

Delay

ðïóüôçôá

Í.

Áí

(Äéáäéêáóßá)

Ó ý í ô á î ç : Delay(MS: word); Êáèõóôåñåß ôçí åêôÝëåóç ôïõ ðñïãñÜììáôïò ãéá MS ÷éëéïóôÜ ôïõ äåõôåñïëÝðôïõ (miliseconds). Ì ï í Ü ä á : Crt

Delete

(Äéáäéêáóßá)

Ó ý í ô á î ç : Delete(var S: string; Index: integer; Count: integer); ÄéáãñÜöåé Count ÷áñáêôÞñåò áðü ôç óåéñÜ ÷áñáêôÞñùí (string) S, áñ÷ßæïíôáò áðü ôï ÷áñáêôÞñá óôç èÝóç Index.  ë Ý ð å : Concat, Copy, Insert, Length, Pos

DelLine

(Äéáäéêáóßá)

Ó ý í ô á î ç : DelLine; ÓâÞíåé ôç ãñáììÞ óôçí ïðïßá âñßóêåôáé ï äñïìÝáò. Ïé ãñáììÝò ðïõ åßíáé áðü êÜôù Ýñ÷ïíôáé ðñïò ôá ðÜíù. Ì ï í Ü ä á : Crt  ë Ý ð å : Insline, Window

Áè. Å. Êïõôóïíéêüëáò


-6Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

DetectGraph

(Äéáäéêáóßá)

Ó ý í ô á î ç : DetectGraph(var GraphDriver, GraphMode: integer); ÅëÝã÷åé ôïí õðïëïãéóôÞ êáé åðéóôñÝöåé ôïí ïäçãü ãñáöéêþí óôçí (GraphDriver) êáé ôïí ôñüðï ëåéôïõñãßáò ãñáöéêþí óôçí (GraphMode), ðïõ áíé÷íåýåé ãéá ôçí åãêáôåóôçìÝíç êÜñôá ãñáöéêþí. Ç äéáäéêáóßá áõôÞ åêôåëåßôáé Ýôóé êé áëëéþò êáëþíôáò ôçí InitGraph. Ì ï í Ü ä á : Graph  ë Ý ð å : CloseGraph, GraphResult, InitGraph

DiskFree

(ÓõíÜñôçóç)

Ó ý í ô á î ç : DiskFree(Drive: byte): longint; ÅðéóôñÝöåé ôïí áñéèìü ôùí åëåýèåñùí bytes ôïõ äßóêïõ ðïõ âñßóêåôáé óôïí ïäçãü Drive, (1=A, 2=B, 0=ðñïåðéëåãìÝíïò ïäçãüò). Áí ç ìåôáâëçôÞ Drive ðåñéÝ÷åé Üêõñï íïýìåñï, ç óõíÜñôçóç åðéóôñÝöåé -1. Ì ï í Ü ä á : Dos  ë Ý ð å : DiskSize, GetDir

DiskSize

(ÓõíÜñôçóç)

Ó ý í ô á î ç : DiskSize(Drive: byte): longint; ÅðéóôñÝöåé óõíïëéêü ìÝãåèïò óå bytes ôïõ äßóêïõ ðïõ âñßóêåôáé óôïí ïäçãü Drive, (1=A, 2=B, 0=ðñïåðéëåãìÝíïò ïäçãüò). Áí ç ìåôáâëçôÞ Drive ðåñéÝ÷åé Üêõñï íïýìåñï, ç óõíÜñôçóç åðéóôñÝöåé -1. Ì ï í Ü ä á : Dos  ë Ý ð å : DiskFree, GetDir

Dispose

(Äéáäéêáóßá)

Ó ý í ô á î ç : Dispose(var Ñ: pointer); Áðïäåóìåýåé ôï ÷þñï ìíÞìçò óùñïý óôïí ïðïßï äåß÷íåé ï äåßêôçò P êáé ï äåßêôçò P äåí åßíáé ïñéóìÝíïò. Ç Dispose ÷ñçóéìïðïéåßôáé óå óõíäõáóìü ìå ôç New êáé äåí ðñÝðåé íá ÷ñçóéìïðïéåßôáé óå óõíäõáóìü ìå ôéò Mark Þ Release.  ë Ý ð å : FreeMem, GetMem, Mark, New, Release

DosExitCode

(ÓõíÜñôçóç)

Ó ý í ô á î ç : DosExitCode: word; ÅðéóôñÝöåé ôïí êùäéêü åîüäïõ ìéáò õðïäéáäéêáóßáò. (0=êáíïíéêüò ôåñìáôéóìüò, 1=ôåñìáôéóìüò ìå ôï Ctrl-C, 2=ôåñìáôéóìüò áðü óöÜëìá óõóêåõÞò, 3=ôåñìáôéóìüò ìå ôç äéáäéêáóßá Keep). Ì ï í Ü ä á : Dos  ë Ý ð å : Exec, Keep

Áè. Å. Êïõôóïíéêüëáò


-7Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

DosVersion

(ÓõíÜñôçóç)

Ó ý í ô á î ç : DosVersion: word; ÅðéóôñÝöåé ôïí áñéèìü Ýêäïóçò ôïõ DOS. Ôï byte õøçëÞò ôÜîçò ôïõ áðïôåëÝóìáôïò åßíáé ï ðñùôåýùí áñéèìüò Ýêäïóçò êáé ôï byte ÷áìçëÞò ôÜîçò åßíáé ï äåõôåñåýùí áñéèìüò Ýêäïóçò. Ì ï í Ü ä á : Dos

DrawPoly

(Äéáäéêáóßá)

Óýíôáîç: DrawPoly(NumPoints: word; var PolyPoints: PointsArray); Ó÷åäéÜæåé ôï ðåñßãñáììá åíüò ðïëõãþíïõ ìå ðëÞèïò êïñõöþí NumPoints, ÷ñçóéìïðïéþíôáò ôïí ôñÝ÷ïíôá ôýðï ãñáììÞò êáé ôï ôñÝ÷ïí ÷ñþìá. Ï ðßíáêáò PolyPoints ðåñéÝ÷åé ôéò óõíôåôáãìÝíåò ôùí êïñõöþí ôïõ ðïëõãþíïõ, ôá óôïé÷åßá áõôïý ôïõ ðßíáêá åßíáé ôýðïõ PointType. Óçìåéþóôå üôé ãéá íá ó÷åäéÜóïõìå Ýíá ðïëýãùíï ìå Í êïñõöÝò ðñÝðåé ï ðßíáêáò PolyPoints íá Ý÷åé Í+1 èÝóåéò êáé åðßóçò PolyPoints[1]=PolyPoints[N+1]. Ç äïìÞ ôïõ ôýðïõ PointType üðùò ïñßæåôáé óôçí ìïíÜäá Graph åßíáé: type PointType = record X,Y: word end;

Åôóé ï ôýðïò PointsArray èá ìðïñïýóå íá ïñéæüôáí óôï ðñüãñáììÜ ìáò ùò åîÞò: const MaxPts = 7; type PointsArray = array[1..MaxPts] of PointType;

Ì ï í Ü ä á : Graph  ë Ý ð å : FillPoly, GraphResult, GetLineSettings, SetColor, SetLineStyle

DSeg

(ÓõíÜñôçóç)

Ó ý í ô á î ç : DSeg: word; ÅðéóôñÝöåé ôçí ôñÝ÷ïõóá ôéìÞ ôïõ êáôá÷ùñçôÞ DS (Data Segment), ï ïðïßïò ðåñéÝ÷åé ôç äéåýèõíóç ôçò áñ÷Þò ôïõ ôìÞìáôïò äåäïìÝíùí ôïõ ðñïãñÜììáôïò.  ë Ý ð å : CSeg, SSeg

Ellipse

(Äéáäéêáóßá)

Ó ý í ô á î ç : Ellipse(X, Y: integer; StAngle, EndAngle: word; XRadius, YRadius: word); Ó÷åäéÜæåé ôüîï Ýëëåéøçò, ìå ïñéæüíôéá áêôßíá XRadius êáé êáôáêüñõöç YRadius, áðü ôç ãùíßá áñ÷Þò (StAngle) ìÝ÷ñé ôç ãùíßá ôÝëïõò (EndAngle), ÷ñçóéìïðïéþíôáò ôï óçìåßï (X,Y) ùò êÝíôñï. Ì ï í Ü ä á : Graph

Áè. Å. Êïõôóïíéêüëáò


-8Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

 ë Ý ð å : Arc, Circle, GetArcCoords, GetAspectRatio, PieSlice

EnvCount

(ÓõíÜñôçóç)

Ó ý í ô á î ç : EnvCount: integer; ÅðéóôñÝöåé ôï ðëÞèïò ôùí óåéñþí ÷áñáêôÞñùí ïñßæïíôáé óáí ìåôáâëçôÝò óôï ðåñéâÜëëïí DOS. Ì ï í Ü ä á : Dos  ë Ý ð å : EnvStr, GetEnv

EnvStr

(strings)

ðïõ

(ÓõíÜñôçóç)

Ó ý í ô á î ç : EnvStr(Index: integer): string; ÅðéóôñÝöåé ôç óåéñÜ ÷áñáêôÞñùí (string) ðåñéâÜëëïíôïò ìå áñéèìü Index. ÐñÝðåé íá éó÷ýåé: 1 d Index d EnvCount. Ì ï í Ü ä á : Dos  ë Ý ð å : EnvCount, GetEnv

Eof

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Eof(F: filetype): boolean; ÅðéóôñÝöåé áëçèÞ ôéìÞ (TRUE) üôáí ï äåßêôçò ôïõ áñ÷åßïõ, ðïõ Ý÷åé ãßíåé Assign ìå ôç ìåôáâëçôÞ áñ÷åßïõ F, öôÜóåé óôï ôÝëïò ôïõ áñ÷åßïõ.  ë Ý ð å : Eoln, SeekEof

Eoln

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Eoln [ (var F: text) ]: boolean; ÅðéóôñÝöåé áëçèÞ ôéìÞ (TRUE) üôáí ï äåßêôçò áñ÷åßïõ êåéìÝíïõ, ðïõ Ý÷åé ãßíåé Asign ìå ôç ìåôáâëçôÞ áñ÷åßïõ F, öôÜóåé óôï ôÝëïò ìéáò ãñáììÞò ôïõ áñ÷åßïõ.  ë Ý ð å : Eof, SeekEoln

Erase

(Äéáäéêáóßá)

Ó ý í ô á î ç : Erase(var F: filetype); ÓâÞíåé áðü ôï äßóêï ôï áñ÷åßï ðïõ ìåôáâëçôÞ áñ÷åßïõ F.  ë Ý ð å : Rename

Ý÷åé

Áè. Å. Êïõôóïíéêüëáò

ãßíåé

Assign

ìå

ôç


-9Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

Exec

(Äéáäéêáóßá)

Ó ý í ô á î ç : Exec(Path, CmdLine: string); Åêôåëåß ôï åîùôåñéêü ðñüãñáììá ôïõ ïðïßïõ ôï üíïìá äçëþíåôáé óôçí äéáäñïìÞ Path, ìå ôéò ðáñáìÝôñïõò ãñáììÞò äéáôáãþí ðïõ ïñßæïíôáé óôçí CmdLine. Ãéá ðáñÜäåéãìá óôï ðáñáêÜôù ðñüãñáììá: {$M 2000,0,0} program TEST; uses Dos; begin SwapVectors; exec('PROGTEST.EXE','A,B,C'); readln; exec('\COMMAND.COM',''); SwapVectors end.

ç ðñþôç åíôïëÞ Exec åêôåëåß ôï ðñüãñáììá PROGTEST.EXE ìå ðáñáìÝôñïõò ãñáììÞò åíôïëþí A,B,C. Ç äåýôåñç åíôïëÞ Exec êáëåß ôï áñ÷åßï COMMAND.COM ôïõ DOS ÷ùñßò ðáñáìÝôñïõò. Áõôü äçìéïõñãåß Ýíá êÝëõöïò ôïõ DOS áðü ôï ïðïßï ìðïñïýìå íá åêôåëÝóïõìå Üëëá ðñïãñÜììáôá. Áð'ôï êÝëõöïò áõôü âãáßíïõìå ðëçêôñïëïãþíôáò EXIT. Ìå ôçí ïäçãßá ðñïò ôï ìåôáãëùôôéóôÞ ðïõ âñßóêåôáé óôçí áñ÷Þ ôïõ ðñïãñÜììáôïò ðåñéïñßæïõìå ôï ìÝãåèïò ôçò ìíÞìçò ðïõ Ý÷åé êáôáíåìçèåß óôï óùñü, þóôå íá ìåßíåé ÷þñïò ãéá ôï ðñüãñáììá ðïõ åêôåëåßôáé.  ë Ý ð å : DosExitCode

Exit

(Äéáäéêáóßá)

Ó ý í ô á î ç : Exit; Ðñïêáëåß Üìåóç Ýîïäï áðü ôï ôñÝ÷ïí ôìÞìá ðñïãñÜììáôïò. Áí ôï ôñÝ÷ïí ôìÞìá åßíáé ôï êýñéï ðñüãñáììá, ôüôå áõôü èá ôåñìáôéóôåß.  ë Ý ð å : Halt

Exp

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Exp(R: real): real; ÅðéóôñÝöåé ôï e (âÜóç ôùí öõóéêþí ëïãáñßèìùí), õøùìÝíï óôç äýíáìç R (ER).  ë Ý ð å : Ln

FExpand

(ÓõíÜñôçóç)

Ó ý í ô á î ç : FExpand(Path: pathstr): pathstr; ÄÝ÷åôáé Ýíá üíïìá áñ÷åßïõ Path êáé åðéóôñÝöåé ôï üíïìá áñ÷åßïõ ìå ôçí ðëÞñç äïìÞ ôçò äéáäñïìÞò ôïõ, óõìðåñéëáìâáíïìÝíïõ êáé ôïõ ïäçãïý äßóêïõ, óôç ìïñöÞ Ïäçãüò/ÄéáäñïìÞ/Ïíïìá áñ÷åßïõ. Ï ôýðïò pathstr ïñßæåôáé óôç ìïíÜäá Dos ùò string[79]. Ì ï í Ü ä á : Dos  ë Ý ð å : FindFirst, FindNext, FSplit

Áè. Å. Êïõôóïíéêüëáò


-10Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

FilePos

(ÓõíÜñôçóç)

Ó ý í ô á î ç : FilePos(var F: file): longint; ÅðéóôñÝöåé ôïí áñéèìü ôçò åããñáöÞò óôçí ïðïßá âñßóêåôáé ï äåßêôçò ôïõ áñ÷åßïõ ðïõ Ý÷åé ãßíåé Assign ìå ôç ìåôáâëçôÞ áñ÷åßïõ F.  ë Ý ð å : FileSize, Seek

FileSize

(ÓõíÜñôçóç)

Ó ý í ô á î ç : FileSize(var F:file): longint; ÅðéóôñÝöåé ôïí áñéèìü ôùí åããñáöþí ðïõ ðåñéÝ÷åé ôï áñ÷åßï ðïõ Ý÷åé ãßíåé Assign ìå ôç ìåôáâëçôÞ áñ÷åßïõ F.  ë Ý ð å : FilePos

FillChar

(Äéáäéêáóßá)

Ó ý í ô á î ç : FillChar(var X: anytype; Count: word; C: scalar); Ãåìßæåé Count óõíå÷Þ bytes ôçò ìíÞìçò ìå ôçí ôéìÞ C ðïõ ìðïñåß íá åßíáé ïðïéïõäÞðïôå âáèìùôïý ôýðïõ. Ôï ãÝìéóìá áñ÷ßæåé áðü ôç äéåýèõíóç ôçò ìåôáâëçôÞò X.  ë Ý ð å : Move

FillElipse

(Äéáäéêáóßá)

Ó ý í ô á î ç : FillElipse(X,Y: integer; XRadius, YRadius: word); Ó÷åäéÜæåé ìéá Ýëëåéøç ìå êÝíôñï óôï óçìåßï (×,Õ), ïñéæüíôéá áêôßíá XRadius êáé êáôáêüñõöç YRadius. Ç Ýëëåéøç åßíáé ãåìéóìÝíç ìå ôï ôñÝ÷ïí ÷ñþìá êáé ó÷Ýäéï ãåìßóìáôïò. Ì ï í Ü ä á : Graph  ë Ý ð å : Ellipse, GetFillSettings, GetLineSettings, GraphResult, SetFillPattern, SetFillStyle, SetLineStyle

FillPoly

(Äéáäéêáóßá)

Óýíôáîç: FillPoly(NumPoints: word; var PolyPoints: PointsArray); Ó÷åäéÜæåé Ýíá ðïëýãùíï ìå NumPoints êïñõöÝò. Ï ðßíáêáò PolyPoints ðåñéÝ÷åé ôéò óõíôåôáãìÝíåò ôùí êïñõöþí, ôá óôïé÷åßá áõôïý ôïõ ðßíáêá åßíáé ôýðïõ PointType, äçëáäÞ åããñáöÞò ðïõ ïñßæåôáé óôçí ìïíÜäá Graph êáé ðïõ ðåñéÝ÷åé Ýíá æåýãïò óõíôåôáãìÝíùí × êáé Õ. Ôï ðïëýãùíï åßíáé ãåìéóìÝíï ìå ôï ôñÝ÷ïí ÷ñþìá êáé ó÷Ýäéï ãåìßóìáôïò, ðïõ ïñßæïíôáé ìå ôç äéáäéêáóßá SetFillStyle. Ì ï í Ü ä á : Graph  ë Ý ð å : DrawPoly, GetFillSettings, GetLineSettings, GraphResult, SetFillPattern, SetFillStyle, SetLineStyle

Áè. Å. Êïõôóïíéêüëáò


-11Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

FindFirst

(Äéáäéêáóßá)

Ó ý í ô á î ç : FindFirst(Path: string; Attr: word; var F: SearchRec); ÅðéóôñÝöåé óôçí F ðëçñïöïñßåò ãéá ôï ðñþôï áñ÷åßï ðïõ èá âñåèåß óôïí êáôÜëïãï Path, ôïõ ïðïßïõ ïé éäéüôçôåò íá óõìöùíïýí ìå ôï Attr. Ïé êáèéåñùìÝíåò ôéìÝò ôïõ Attr üðùò ïñßæïíôáé óôçí ìïíÜäá Dos åßíáé: const ReadOnly = Hidden = SysFile = VolumeId = Directory = Archive = AnyFile =

$01; $02; $04; $08; $10; $20; $3F;

{ { { { { { {

Ìüíï áíÜãíùóçò } ÊñõììÝíï } Áñ÷åßï óõóôÞìáôïò } ÅôéêÝôá } ÊáôÜëïãïò } Áñ÷åéïèÝôçóçò } ÏðïéïäÞðïôå áñ÷åßï }

Ç äïìÞ ôïõ ôýðïõ SearchRec üðùò ïñßæåôáé óôç ìïíÜäá Dos åßíáé: type SearchRec = record Fill: Attr: Time: Size: Name: end;

array[1..21] of byte; {ÄåóìåõìÝíï áðü ôï DOS} byte; {Éäéüôçôåò ôïõ áñ÷åßïõ} lingint; {×ñüíïò ôåëåõôáßáò ìåôáôñïðÞò} longint; {ÌÝãåèïò óå Bytes} string[12] {Ïíüìá áñ÷åßïõ}

Áí ç áíáæÞôçóç åßíáé åðéôõ÷Þò, ôüôå ç ôéìÞ ôïõ DosError èá åßíáé ìçäÝí. ÐéèáíÝò ôéìÝò ôïõ DosError: 2: 3: 5: 6: 8: 10: 11: 18:

Ôï åñ÷åßï äå âñÝèçêå Ç äéáäñïìÞ (Path) äå âñÝèçêå Ç ðñïóðÝëáóç áðÝôõ÷å Áêõñç ëåéôïõñãßá Åëëåéøç ÷þñïõ óôç ìíÞìç Áêõñï ðåñéâÜëëïí, ð.÷ ìç óõìâáôü ëåéôïõñãéêü óýóôçìá Áêõñï öïñìÜñéóìá ÔÝëïò áíÜãíùóçò êáôáëüãïõ

Ì ï í Ü ä á : Dos  ë Ý ð å : FExpand, FindNext

FindNext

(Äéáäéêáóßá)

Ó ý í ô á î ç : FindNext(var F: SearchRec); ÅðéóôñÝöåé óôçí F ðëçñïöïñßåò ãéá ôï åðüìåíï áñ÷åßï ðïõ èá âñåèåß óôïí êáôÜëïãï Path, ï ïðïßïò ïñßóôçêå óôçí FindFirst êáé ðïõ ôá ÷áñáêôçñéóôéêÜ ôïõ óõìöùíïýí ì'áõôÜ ðïõ ÷ñçóéìïðïéÞèçêáí óôçí FindFirst. Áí ç áíáæÞôçóç åßíáé åðéôõ÷Þò, ôüôå ç ôéìÞ ôçò DosError èá åßíáé ìçäÝí. Ì ï í Ü ä á : Dos  ë Ý ð å : FExpand, FindFirst

Áè. Å. Êïõôóïíéêüëáò


-12Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

FloodFill

(Äéáäéêáóßá)

Ó ý í ô á î ç : FloodFill(X, Y: integer; BorderColor: word); Ãåìßæåé ìéá ïñéïèåôçìÝíç ðåñéï÷Þ ôçò ïèüíçò ãñáöéêþí ìå ôï ôñÝ÷ïí ó÷Ýäéï êáé ÷ñùìáôéóìü ðïõ ïñßæïíôáé ìå ôç äéáäéêáóßá SetFillStyle. Ç ðåñéï÷Þ ðñÝðåé íá åßíáé åíôåëþò êëåéóìÝíç áðü ôï ÷ñþìá BorderColor êáé ïé óõíôåôáãìÝíåò (×,Õ) ðñÝðåé íá âñßóêïíôáé ìÝóá óôçí ðåñéï÷Þ ðïõ èá ãåìßóåé. Ì ï í Ü ä á : Graph  ë Ý ð å : SetFillPattern, SetFillStyle

Flush

(Äéáäéêáóßá)

Ó ý í ô á î ç : Flush(var F: text); ÃñÜöåé óôï äßóêï üëá ôá ðåñéå÷üìåíá ôçò ðåñéï÷Þò ðñïóùñéíÞò áðïèÞêåõóçò ãéá ôï áñ÷åßï ðïõ Ý÷åé ãßíåé Assign ìå ôç ìåôáâëçôÞ áñ÷åßïõ F.  ë Ý ð å : Append, Assign, Close, Reset, Rewrite

Frac

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Frac(R: real): real; ÅðéóôñÝöåé ôï äåêáäéêü ìÝñïò ôïõ ïñßóìáôïò.  ë Ý ð å : Int

FreeMem

(Äéáäéêáóßá)

Ó ý í ô á î ç : FreeMem(var P: pointer; Size: word); Áðåëåõèåñþíåé Size bytes ìíÞìçò áðü ôï óùñü ðïõ áíôéóôïé÷ïýí óôïí äåßêôç P. Ï äåßêôçò Ñ ðñÝðåé ðñïçãïõìÝíùò íá Ý÷åé äåóìåýóåé ìíÞìç, ìå ôç äéáäéêáóßá GetMem. Äåí ðñÝðåé íá ÷ñçóéìïðïéåßôáé ìå ôéò Mark Þ Release.  ë Ý ð å : Dispose, GetMem, Mark, New, Release

FSearch

(ÓõíÜñôçóç)

Ó ý í ô á î ç : FSearch(Path: pathstr; DirList: string): pathstr; ÁíáæçôÜ óôçí ëßóôá êáôáëüãùí ðïõ ðåñéëáìâÜíïíôáé óôçí DirList, Ýíá üíïìá áñ÷åßïõ ðïõ íá óõìöùíåß ìå ôï Path. Áí âñåèåß ôï áñ÷åßï, ôï áðïôÝëåóìá åðéóôñÝöåôáé ùò óåéñÜ ÷áñáêôÞñùí (string). Áí äå âñåèåß, ç óõíÜñôçóç åðéóôñÝöåé ìéá êåíÞ óåéñÜ ÷áñáêôÞñùí. Ïé êáôÜëïãïé óôï DirList ðñÝðåé íá ÷ùñßæïíôáé ìå åëëçíéêÜ åñùôçìáôéêÜ. Ï ôýðïò pathstr ïñßæåôáé óôç ìïíÜäá Dos ùò string[79]. Ì ï í Ü ä á : Dos  ë Ý ð å : FExpand, FSplit, GetEnv

Áè. Å. Êïõôóïíéêüëáò


-13Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

FSplit

(Äéáäéêáóßá)

Ó ý í ô á î ç : FSplit(Path: PathStr; var Dir: DirStr; var Name: NameStr; var Ext: ExtStr); ×ùñßæåé Ýíá üíïìá áñ÷åßïõ (Path) óôá ôñßá óõóôáôéêÜ ôïõ: õðïêáôÜëïãï, üíïìá, ðñïÝêôáìá êáé åðéóôñÝöåé áõôÜ óôéò Dir, Name êáé Ext áíôßóôïé÷á. Ïé óåéñÝò ÷áñáêôÞñùí (string) Dir, Name êáé Ext ïñßæïíôáé óôç ìïíÜäá Dos ùò åîÞò: type PathStr = string[79]; { DirStr = string[67]; { NameStr = string[8]; { ExtStr = string[4]; {

Ïíïìá äéáäñïìÞò } Ïíïìá õðïêáôáëüãïõ } Ïíïìá áñ÷åßïõ } ÐñïÝêôáìá áñ÷åßïõ }

Ì ï í Ü ä á : Dos  ë Ý ð å : FExpand, FindFirst, FindNext

GetArcCoords

(Äéáäéêáóßá)

Ó ý í ô á î ç : GetArcCoords(var ArcCoords: ArcCoordsType); ÅðéóôñÝöåé óôçí ArcCoords ôéò óõíôåôáãìÝíåò ðïõ ÷ñçóéìïðïéÞèçêáí áðü ôçí ôåëåõôáßá åíôïëÞ Arc Þ Ellipse. Ç äïìÞ ôïõ ôýðïõ ArcCoordsType üðùò ïñßæåôáé óôçí ìïíÜäá Graph åßíáé: type ArcCoordsType = record X,Y: integer; { êÝíôñï ôïõ ôüîïõ } XStart,YStart: integer; { óõíôåôáãìÝíåò áñ÷Þò } Xend,Yend: integer { óõíôåôáãìÝíåò ôÝëïõò } end;

Ì ï í Ü ä á : Graph  ë Ý ð å : Arc, Circle, Ellipse, PieSlice

GetAspectRatio

(Äéáäéêáóßá)

Ó ý í ô á î ç : GetAspectRatio(var Xasp, Yasp: word); ÅðéóôñÝöåé óôéò Xasp êáé Yasp ôçí ðñáãìáôéêÞ áíÜëõóç ôçò ïèüíçò ãñáöéêþí, áðü ôéò ïðïßåò ìðïñåß íá õðïëïãéóôåß ï ëüãïò èÝáóçò (aspect ratio) (Xasp/Yasp) Ì ï í Ü ä á : Graph  ë Ý ð å : Arc, Circle, Ållipse, GetMaxX, GetMaxY, PieSlice

GetBkColor

(ÓõíÜñôçóç)

Ó ý í ô á î ç : GetBkColor: word; ÅðéóôñÝöåé ôïí êùäéêü ôïõ ôñÝ÷ïíôïò ÷ñþìáôïò öüíôïõ ìÝóá óôçí ôñÝ÷ïõóá ðáëÝôá. Ì ï í Ü ä á : Graph  ë Ý ð å : GetColor, GetPalette, InitGraph, SetAllPalette, SetBkColor, SetColor, SetPalette

Áè. Å. Êïõôóïíéêüëáò


-14Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

GetCBreak

(Äéáäéêáóßá)

Ó ý í ô á î ç : GetCBreak(var Break: boolean); ÅðéóôñÝöåé óôçí Break ôçí êáôÜóôáóç åëÝã÷ïõ ôïõ DOS, ãéá ôï áí ðáôÞèçêå Ctrl-Break. Ïôáí ç Break åßíáé øåõäÞò (FALSE), ôüôå ôï DOS åëÝã÷åé áí ðáôÞèçêå ôï Ctrl-Break óôçí äéÜñêåéá åéóüäïõ/åîüäïõ áðü ôï ðëçêôñïëüãéï, ôçí ïèüíç, ôïí åêôõðùôÞ, Þ ôéò óåéñéáêÝò èýñåò. Ïôáí åßíáé áëçèÞò (TRUE), ôï DOS åëÝã÷åé ãéá ôï Ctrl-Break óå êÜèå êëÞóç ôïõ óõóôÞìáôïò. Ì ï í Ü ä á : Dos  ë Ý ð å : SetCBreak

GetColor

(ÓõíÜñôçóç)

Ó ý í ô á î ç : GetColor: word; ÅðéóôñÝöåé ôïí êùäéêü ôïõ ôñÝ÷ïíôïò ÷ñþìáôïò ó÷åäßáóçò óôïí ôñüðï ëåéôïõñãßáò ãñáöéêþí ðïõ ôÝèçêå ìå ôç äéáäéêáóßá SetColor. Ì ï í Ü ä á : Graph  ë Ý ð å : GetBkColor, GetPalette, InitGraph, SetAllPalette, SetColor, SetPalette

GetDate

(Äéáäéêáóßá)

Ó ý í ô á î ç : GetDate(var Year, Month, Day, DayOfWeek: word); ÅðéóôñÝöåé ôçí çìåñïìçíßá ôïõ ëåéôïõñãéêïý óõóôÞìáôïò. (Åôïò, ÌÞíá, ÇìÝñá ôïõ ìÞíá, ÇìÝñá ôçò åâäïìÜäáò), óôéò Year, Month, Day êáé DayOfWeek áíôßóôïé÷á. ÐñÝðåé íá óçìåéùèåß üôé ç DayOfWeek äÝ÷åôáé ôéìÝò ðïõ êõìáßíïíôáé áíÜìåóá óå 0, (ÊõñéáêÞ) êáé 7 (ÓÜââáôï). Ì ï í Ü ä á : Dos  ë Ý ð å : GetTime, SetDate, SetTime

GetDefaultPalette

(Äéáäéêáóßá)

Ó ý í ô á î ç : GetDefaultPalette(var Palette: PaletteType); ÅðéóôñÝöåé óôçí Palette ôñÝ÷ïõóá ðáëÝôá ôïõ ôñÝ÷ïíôïò ïäçãïý ãñáöéêþí. Ç äïìÞ ôïõ ôýðïõ PaletteType üðùò ïñßæåôáé óôçí ìïíÜäá Graph åßíáé: const MaxColors = 15; type PaletteType = record Size: byte; Colors: array[0..MaxColors] of shortint end;

Ì ï í Ü ä á : Graph  ë Ý ð å : GetPalette

Áè. Å. Êïõôóïíéêüëáò


-15Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

GetDir

(Äéáäéêáóßá)

Ó ý í ô á î ç : GetDir(D: byte; var S: string); ÅðéóôñÝöåé óôçí S, ôïí ôñÝ÷ïíôá êáôÜëïãï ãéá ôïí ïäçãü äßóêïõ ðïõ êáèïñßæåôáé áðü ôçí D. Áí ôï D åßíáé ìçäÝí, ôüôå ç GetDir ðñáãìáôïðïéåß ôçí áíáæÞôçóç óôïí ðñïåðéëåãìÝíï ïäçãü.  ë Ý ð å : ChDir, DiskFree, DiskSize, MkDir, RmDir

GetDriverName

(ÓõíÜñôçóç)

Ó ý í ô á î ç : GetDriverName: string; ÅðéóôñÝöåé ôï üíïìá ôïõ ôñÝ÷ïíôïò ïäçãïý ãñáöéêþí. Ì ï í Ü ä á : Graph  ë Ý ð å : InstallUserDriver

GetEnv

(ÓõíÜñôçóç)

Ó ý í ô á î ç : GetEnv(EnvVar: string): string; ÅðéóôñÝöåé ôç óåéñÜ ÷áñáêôÞñùí (string) ðåñéâÜëëïíôïò ðåñéÝ÷åôáé óôçí ìåôáâëçôÞ ðåñéâÜëëïíôïò EnvVar. Ì ï í Ü ä á : Dos  ë Ý ð å : EnvCount, EnvStr

GetFAttr

ðïõ

(Äéáäéêáóßá)

Ó ý í ô á î ç : GetFAttr(var F: file; var Attr: word); ÅðéóôñÝöåé óôçí Attr ôçí éäéüôçôá ôïõ áñ÷åßïõ ðïõ Ý÷åé ãßíåé Assign ìå ôç ìåôáâëçôÞ áñ÷åßïõ F. Ðñéí êáëÝóïõìå áõôÞ ôç äéáäéêáóßá, ðñÝðåé ôï F íá Ý÷åé åê÷ùñçèåß (Assign), áëëÜ íá ìçí Ý÷åé áíïé÷èåß. Ãéá ôéò ôéìÝò ôïõ Attr âëÝðå ôç äéáäéêáóßá FindFirst. Ì ï í Ü ä á : Dos  ë Ý ð å : GetFTime, SetFAttr, SetFTime

GetFillPattern

(Äéáäéêáóßá)

Ó ý í ô á î ç : GetFillPattern(var FillPattern: FillPatternType); ÅðéóôñÝöåé óôçí FillPattern, ôïí ïñéóìü ôïõ ôñÝ÷ïíôïò ó÷åäßïõ ãåìßóìáôïò ðïõ ôÝèçêå ìå ôçí SetFillPattern. H äïìÞ ôïõ FillPatternType, üðùò ïñßæåôáé óôçí ìïíÜäá Graph, åßíáé: type FillPatternType = array[1..8] of byte;

Ì ï í Ü ä á : Graph  ë Ý ð å : SetFillPattern

Áè. Å. Êïõôóïíéêüëáò


-16Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

GetFillSettings

(Äéáäéêáóßá)

Ó ý í ô á î ç : GetFillSettings(var FillInfo: FillSettingsType); ÅðéóôñÝöåé óôçí FillInfo ôï ôñÝ÷ïí ÷ñþìá êáé ó÷Ýäéï ãåìßóìáôïò ðïõ ôÝèçêå ìå ôçí SetFillStyle Þ ôçí SetFillPattern. Ç äïìÞ ôïõ ôýðïõ FillSettingsType, üðùò ïñßæåôáé óôçí ìïíÜäá Graph, åßíáé: type FillSettingsType = record Pattern, Color: word end;

Ì ï í Ü ä á : Graph  ë Ý ð å : FillPoly, SetFillPattern, SetFillStyle

GetFTime

(Äéáäéêáóßá)

Ó ý í ô á î ç : GetFTime(var F: file; var Time: longint); ÅðéóôñÝöåé óôçí Time ôçí çìåñïìçíßá êáé þñá ôçò ôåëåõôáßáò åíçìÝñùóçò ôïõ áñ÷åßïõ ðïõ Ý÷åé ãßíåé Assign ìå ôç ìåôáâëçôÞ áñ÷åßïõ F. Ôï F ðñÝðåé íá Ý÷åé åê÷ùñçèåß (Assign) êáé íá åßíáé áíïéêôü ðñéí ôçí êëÞóç áõôÞò ôçò äéáäéêáóßáò. Ç ìåôáâëçôÞ Time åßíáé óå óõíåðôõãìÝíç (Pack) ìïñöÞ êáé ðñÝðåé íá áðïóõìðôõ÷èåß ìå ôç äéáäéêáóßá UnPackTime. Ì ï í Ü ä á : Dos  ë Ý ð å : PackTime, SetFAttr, SetFTime, UnPackTime

GetGraphMode

(ÓõíÜñôçóç)

Ó ý í ô á î ç : GetGraphMode: integer; ÅðéóôñÝöåé ôïí ôñÝ÷ïíôá ôñüðï ëåéôïõñãßáò ãñáöéêþí. Ç áñéèìçôéêÞ ôéìÞ ôïõ ôñüðïõ ëåéôïõñãßáò ãñáöéêþí ðñÝðåé íá åñìçíåõôåß óå óõíäõáóìü ìå ôïí ïäçãü ãñáöéêþí. Ì ï í Ü ä á : Graph  ë Ý ð å : ClearDevice, DetectGraph, InitGraph, RestoreCrtMode, SetGraphMode

GetImage

(Äéáäéêáóßá)

Ó ý í ô á î ç : GetImage(X1, Y1, X2, Y2: integer; var BitMap); Áðïèçêåýåé óôçí BitMap (ðïõ åßíáé ìéá ðåñéï÷Þ ðñïóùñéíÞò áðïèÞêåõóçò óôçí ïðïßá äåß÷íåé êÜðïéïò äåßêôçò ôýðïõ Pointer) Ýíá ïñèïãþíéï ôìÞìá ôçò ïèüíçò ãñáöéêþí, ðïõ ïñßæåôáé áðü ôéò óõíôåôáãìÝíåò (×1,Õ1) êáé (×2,Õ2). Ì ï í Ü ä á : Graph  ë Ý ð å : ImageSize, PutImage

Áè. Å. Êïõôóïíéêüëáò


-17Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

GetIntVec

(Äéáäéêáóßá)

Ó ý í ô á î ç : GetIntVec(IntNo: byte; var Vector: pointer); Áðïèçêåýåé óôçí Vector ôï ðåñéå÷üìåíï ôïõ äéáíýóìáôïò äéáêïðÞò ìå áñéèìü IntNo. Ì ï í Ü ä á : Dos  ë Ý ð å : SetIntVec

GetLineSettings

(Äéáäéêáóßá)

Ó ý í ô á î ç : GetLineSettings(var LineInfo: LineSettingsType); ÅðéóôñÝöåé óôçí LineInfo ôïí åðéëåãìÝíï ôýðï, ìïñöÞ êáé ðÜ÷ïò ãñáììÞò ðïõ ôÝèçêå ìå ôçí SetLineStyle.Ç äïìÞ ôïõ ôýðïõ LineSettingsType üðùò ïñßæåôáé óôçí ìïíÜäá Graph åßíáé: type LineSettingsType = record LineStyle: word; { ôýðïò } Pattern: word; { ìïñöÞ } Thickness: word { ðÜ÷ïò } end;

Ì ï í Ü ä á : Graph  ë Ý ð å : DrawPoly, SetLineStyle

GetMaxColor

(ÓõíÜñôçóç)

Ó ý í ô á î ç : GetMaxColor: word; ÅðéóôñÝöåé ôï ìÝãéóôï êùäéêü ÷ñþìáôïò óôçí ôñÝ÷ïõóá ðáëÝôá. Ì ï í Ü ä á : Graph  ë Ý ð å : SetColor, SetPalette

GetMaxMode

(ÓõíÜñôçóç)

Ó ý í ô á î ç : GetMaxMode: word; ÅðéóôñÝöåé ôéìÞ ðïõ äåß÷íåé ôç ìÝãéóôç äõíáôÞ áíÜëõóç óôïí ôñüðï ëåéôïõñãßáò ãñáöéêþí ôçò åãêáôåóôçìÝíçò êÜñôáò. Ì ï í Ü ä á : Graph  ë Ý ð å : SetGraphMode

GetMaxX

(ÓõíÜñôçóç)

Ó ý í ô á î ç : GetMaxX: integer; ÅðéóôñÝöåé ôç ìÝãéóôç ïñéæüíôéá óõíôåôáãìÝíç ãéá ôïí ôñÝ÷ïíôá ôñüðï ëåéôïõñãßáò ãñáöéêþí. Ì ï í Ü ä á : Graph  ë Ý ð å : GetMaxY, GetX, GetY, MoveTo

Áè. Å. Êïõôóïíéêüëáò


-18Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

GetMaxY

(ÓõíÜñôçóç)

Ó ý í ô á î ç : GetMaxY: integer; ÅðéóôñÝöåé ôç ìÝãéóôç êáôáêüñõöç óõíôåôáãìÝíç ãéá ôïí ôñÝ÷ïíôá ôñüðï ëåéôïõñãßáò ãñáöéêþí. Ì ï í Ü ä á : Graph  ë Ý ð å : GetMaxX, GetX, GetY, MoveTo

GetMem

(Äéáäéêáóßá)

Ó ý í ô á î ç : GetMem(var P: pointer; Size: word); Äçìéïõñãåß ìéá íÝá äõíáìéêÞ ìåôáâëçôÞ ìåãÝèïõò Size bytes êáé èÝôåé ôï äåßêôç P íá äåß÷íåé ó'áõôÞ. ×ñçóéìïðïéïýìå ôçí FreeMem ãéá íá áðåëåõèåñþóïõìå ôç ìíÞìç ðïõ äåóìåýôçêå ìå ôçí GetMem.  ë Ý ð å : Dispose, FreeMem, Mark, New, Release

GetModeName

(ÓõíÜñôçóç)

Ó ý í ô á î ç : GetModeName(ModeNumber: word): string; ÅðéóôñÝöåé ôç óåéñÜ ÷áñáêôÞñùí (string) ðïõ áíôéóôïé÷åß ôñüðï ëåéôïõñãßáò ãñáöéêþí ModeNumber. Ì ï í Ü ä á : Graph  ë Ý ð å : GetGraphMode, SetGraphMode

GetModeRange

óôïí

(Äéáäéêáóßá)

Ó ý í ô á î ç : GetModeRange(GraphDriver: integer; var LoMode, HiMode: integer); ÅðéóôñÝöåé óôéò HiMode êáé LoMode, ôïõò ôñüðïõò ëåéôïõñãßáò ìå ôçí õøçëüôåñç êáé ôç ÷áìçëüôåñç áíÜëõóç áíôßóôïé÷á, ãéá ôïí ïäçãü ãñáöéêþí ðïõ äçëþíåôáé ìå ôçí GraphDriver. Ì ï í Ü ä á : Graph  ë Ý ð å : GetGraphMode, InitGraph, SetGraphMode

GetPalette

(Äéáäéêáóßá)

Ó ý í ô á î ç : GetPalette(var Palette: PaletteType); ÅðéóôñÝöåé óôçí Palette ôçí ôñÝ÷ïõóá ðáëÝôá êáé ôç äéÜóôáóÞ ôçò. Ç äïìÞ ôïõ ôýðïõ PaletteType üðùò ïñßæåôáé óôçí ìïíÜäá Graph åßíáé: const MaxColors = 15; type PaletteType = record Size: byte; Colors: array[0..MaxColors] of shortint end;

Ì ï í Ü ä á : Graph  ë Ý ð å : SetAllPalette, SetPalette

Áè. Å. Êïõôóïíéêüëáò


-19Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

GetPaletteSize

(ÓõíÜñôçóç)

Ó ý í ô á î ç : GetPaletteSize: word; ÅðéóôñÝöåé ôï ìÝãéóôï áñéèìü ÷ñùìÜôùí ðáëÝôáò ðïõ õðïóôçñßæåé ï ôñÝ÷ùí ôñüðïò ëåéôïõñãßáò ãñáöéêþí. Ì ï í Ü ä á : Graph  ë Ý ð å : GetPalette, SetPalette

GetPixel

(ÓõíÜñôçóç)

Ó ý í ô á î ç : GetPixel(X,Y: integer): word; ÅðéóôñÝöåé ôï ÷ñþìá ôçò êïõêêßäáò (pixel) (X,Y). Ì ï í Ü ä á : Graph  ë Ý ð å : GetImage, PutImage, PutPixel

GetTextSettings

ìå

óõíôåôáãìÝíåò

(Äéáäéêáóßá)

Ó ý í ô á î ç : GetTextSettings(var TextInfo: TextSettingsType); ÅðéóôñÝöåé óôçí TextInfo ôç ãñáììáôïóåéñÜ, êáôåýèõíóç, ìÝãåèïò êáé óôïß÷éóç ðïõ ôÝèçêå ìå ôéò SetTextStyle êáé SetTextJustify. Ç äïìÞ ôïõ ôýðïõ TextSettingType üðùò ïñßæåôáé óôçí ìïíÜäá Graph åßíáé: type TextSettingType = record Font: word; Direction: word; CharSize: word; Horiz: word; Vert: word end;

Ì ï í Ü ä á : Graph  ë Ý ð å : InitGraph, SetTextJustify, SetTextStyle, TextHeight TextWidth

GetTime

(Äéáäéêáóßá)

Ó ý í ô á î ç : GetTime(var Hour, Minute, Second, Sec100: word); ÅðéóôñÝöåé ôçí þñá ôïõ ëåéôïõñãéêïý óõóôÞìáôïò: þñá, ëåðôÜ, äåõôåñüëåðôá êáé åêáôïóôÜ ôïõ äåõôåñïëÝðôïõ, óôéò ìåôáâëçôÝò Hour, Minute, Second êáé Sec100 áíôßóôïé÷á. Ì ï í Ü ä á : Dos  ë Ý ð å : GetDate, SetDate, SetTime, UnPackTime

Áè. Å. Êïõôóïíéêüëáò


-20Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

GetVerify

(Äéáäéêáóßá)

Ó ý í ô á î ç : GetVerify(var Verify: boolean); ÅðéóôñÝöåé óôçí Verify ôçí êáôÜóôáóç ôçò óçìáßáò åðáëÞèåõóçò åããñáöÞò ôïõ DOS. Ïôáí ç Verify åßíáé áëçèÞò (TRUE), ôï DOS åðáëçèåýåé üëåò ôéò åããñáöÝò óôï äßóêï. Ì ï í Ü ä á : Dos  ë Ý ð å : SetVerify

GetViewSettings

(Äéáäéêáóßá)

Ó ý í ô á î ç : GetViewSettings(var ViewPort: ViewPortType); ÅðéóôñÝöåé óôçí ViewPort ðëçñïöïñßåò ãéá ôéò ôñÝ÷ïõóåò ñõèìßóåéò ôïõ ðáñáèýñïõ ïèüíçò. Ç äïìÞ ôïõ ôýðïõ ViewPortType üðùò ïñßæåôáé óôçí ìïíÜäá Graph åßíáé: type ViewPortType = record X1,Y1,X2,Y2: integer; { óõíôåôáãìÝíåò ôçò ðÜíù áñéóôåñÞò êáé êÜôù äåîéÜò ãùíßáò áíôßóôïé÷á } Clip: boolean { áðïêïðÞ Þ ü÷é ôïõ ó÷åäßïõ óôá üñéáôïõ ðáñáèýñïõ } end;

Ì ï í Ü ä á : Graph  ë Ý ð å : ClearViewPort, SetViewPort

GetX

(ÓõíÜñôçóç)

Ó ý í ô á î ç : GetX: integer; ÅðéóôñÝöåé ôçí ïñéæüíôéá óõíôåôáãìÝíç ôïõ äåßêôç ôñÝ÷ïõóáò èÝóçò óôçí ïèüíç. Ì ï í Ü ä á : Graph  ë Ý ð å : GetViewSettings, GetY, InitGraph, MoveTo, SetViewPort

GetY

(ÓõíÜñôçóç)

Ó ý í ô á î ç : GetY: integer; ÅðéóôñÝöåé ôçí êáôáêüñõöç óõíôåôáãìÝíç ôïõ äåßêôç ôñÝ÷ïõóáò èÝóçò óôçí ïèüíç. Ì ï í Ü ä á : Graph  ë Ý ð å : GetViewSettings, GetX, InitGraph, MoveTo, SetViewPort

GoToXY

(Äéáäéêáóßá)

Ó ý í ô á î ç : GoToXY(X, Y: byte); Ôïðïèåôåß ôï äñïìÝá óôï óçìåßï ìå óõíôåôáãìÝíåò (×,Õ). Ì ï í Ü ä á : Crt  ë Ý ð å : WhereX, WhereY, Window

Áè. Å. Êïõôóïíéêüëáò


-21Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

GraphDefaults

(Äéáäéêáóßá)

Ó ý í ô á î ç : GraphDefaults; ÅðáíáöÝñåé ôéò ñõèìßóåéò ãñáöéêþí óôéò ðñïåðéëåãìÝíåò (default) ôïõò ôéìÝò. Ì ï í Ü ä á : Graph  ë Ý ð å : InitGraph

GraphErrorMsg

(ÓõíÜñôçóç)

Ó ý í ô á î ç : GraphErrorMsg(ErrorCode: integer): string; ÅðéóôñÝöåé Ýíá ìÞíõìá óöÜëìáôïò ðïõ áíôéóôïé÷åß óôçí óõíèÞêç óöÜëìáôïò ðïõ äçëþíåôáé áðü ôï ErrorCode. Ãéá ôá ìçíýìáôá óöÜëìáôïò âëÝðå ôç óõíÜñôçóç GraphResult. Ì ï í Ü ä á : Graph  ë Ý ð å : DetectGraph, GraphResult, InitGraph

GraphResult

(ÓõíÜñôçóç)

Ó ý í ô á î ç : GraphResult: integer; ÅðéóôñÝöåé Ýíáí êùäéêü óöÜëìáôïò ãéá ôçí ôåëåõôáßá ëåéôïõñãßá ãñáöéêþí. Ïé êùäéêïß óöÜëìáôïò ïñßæïíôáé óôçí ìïíÜäá Graph ùò åîÞò: const {ÓôáèåñÜ óöÜëìáôïò, ÓöÜëìá, grOk = 0; { grNoInitGraph = -1; { grNotDetected = -2; { grFileNotFound = -3; { grInvalidDriver = -4; { grNoLoadMem = -5; { grNoScanMem = -6; { grNoFloodMem = -7; { grFontNotFound = -8; { grNoFontMem = -9; { grInvalidMode = -10; { grError = -11; { grIOerror = -12; { grInvalidFont = -13; { grInvalidFontNum = -14; { grInvalidDeviceNum = -15; {

ÌÞíõìá} No error } BGI graphics not installed } Graphics hardware not detected } Device driver file not found } Invalid device driver file } Not enough memory to load driver } Out of memory in scan fill } Out of memory in flood fill } Font file not found } Not enough memory to load font } Inv. graph. mode for selected driver } Graphics error } Graphics I/O error } Invalid font file } Invalid font number } Invalid device number }

Ì ï í Ü ä á : Graph  ë Ý ð å : DetectGraph, DrawPoly, GraphErrorMsg, InitGraph

Halt

(Äéáäéêáóßá)

Ó ý í ô á î ç : Halt [ ( ExitCode: word ) ]; ÓôáìáôÜ ôçí åêôÝëåóç ôïõ ðñïãñÜììáôïò êáé åðéóôñÝöåé ôïí Ýëåã÷ï óôï ëåéôïõñãéêü óýóôçìá.  ë Ý ð å : Exit, RunError

Áè. Å. Êïõôóïíéêüëáò


-22Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

Hi

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Hi(I: integer): byte; ÅðéóôñÝöåé ôï byte õøçëÞò ôÜîçò ôïõ ïñßóìáôïò I.  ë Ý ð å : Lo, Swap

HighVideo

(Äéáäéêáóßá)

Ó ý í ô á î ç : HighVideo; Åíåñãïðïéåß ôçí ðáñïõóßáóç ìå Ýíôïíïõò ÷áñáêôÞñåò. Ì ï í Ü ä á : Crt  ë Ý ð å : LowVideo, NormVideo, TextBackground, TextColor

ImageSize

(ÓõíÜñôçóç)

Ó ý í ô á î ç : ImageSize(X1, Y1, X2, Y2: integer): word; ÅðéóôñÝöåé ôïí áñéèìü ôùí áðáéôïýìåíùí bytes ãéá ôçí áðïèÞêåõóç ôïõ ÷áñôïãñáöçìÝíïõ ãñáöéêïý, ðïõ ïñßæåôáé áðü ôéò óõíôåôáãìÝíåò (X1,Y1) êáé (X2,Y2). Ì ï í Ü ä á : Graph  ë Ý ð å : GetImage, PutImage

Inc

(Äéáäéêáóßá)

Ó ý í ô á î ç : Inc(var X: scalar [; N: longint ] ); ÁõîÜíåé ôçí ôéìÞ ìéáò âáèìùôÞò ìåôáâëçôÞò × êáôÜ Í. Áí ôï Í ðáñáëåéöèåß ôüôå ç × èá áõîçèåß êáôÜ 1.  ë Ý ð å : Dec, Pred, Succ

InitGraph

(Äéáäéêáóßá)

Ó ý í ô á î ç : InitGraph(var GraphDriver: integer; var GraphMode: integer; PathToDriver: string); ÐñïåôïéìÜæåé ôï óýóôçìá ãñáöéêþí êáé ãõñßæåé ôïí õðïëïãéóôÞ óôçí êáôÜóôáóç ãñáöéêþí, óýìöùíá ìå ôïí ïäçãü êÜñôáò ãñáöéêþí GraphDriver êáé ôïí ôñüðï ëåéôïõñãßáò ãñáöéêþí GraphMode. Ç äéáäéêáóßá èá áíáæçôÞóåé áñ÷åßá BGI óôçí äéáäñïìÞ ðïõ ïñßæåôáé áðü ôçí PathToDriver. Ïé êùäéêïß ãéá ôo GraphDriver üðùò ïñßæïíôáé óôçí ìïíÜäá Graph åßíáé: const Detect CGA MCGA EGA EGA64 EGAMono RESERVED

= = = = = = =

0; 1; 2; 3; 4; 5; 6;

Áè. Å. Êïõôóïíéêüëáò


-23Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL HercMono ATT400 VGA PC3270

= = = =

7; 8; 9; 10;

Ì ï í Ü ä á : Graph  ë Ý ð å : CloseGraph, GraphResult, DetectGraph, RestoreCrtMode, SetGraphBufSize, SetGraphMode

Insert

(Äéáäéêáóßá)

Ó ý í ô á î ç : Insert(Source: string; var S: string; Index: integer); ÐáñåìâÜëëåé ôç óåéñÜ ÷áñáêôÞñùí (string) Source óôçí óåéñÜ ÷áñáêôÞñùí S, áñ÷ßæïíôáò áðü ôç èÝóç Index ôçò S.  ë Ý ð å : Copy, Concat, Delete, Length, Pos

InsLine

(Äéáäéêáóßá)

Ó ý í ô á î ç : InsLine; ÐáñåìâÜëëåé ìéá êåíÞ ãñáììÞ óôç èÝóç ôïõ äñïìÝá. Ì ï í Ü ä á : Crt  ë Ý ð å : DelLine, Window

InstallUserDriver

(ÓõíÜñôçóç)

Ó ý í ô á î ç : InstallUserDriver(Name: string; AutoDetectPtr: pointer): integer; ÅãêáèéóôÜ Ýíáí ïäçãü ãñáöéêþí ðïõ äåí åßíáé ôçò Borland. To Name äçëþíåé ôï üíïìá ôïõ áñ÷åßïõ ðïõ ðåñéÝ÷åé ôïí ïäçãü êáé ôï AutoDetectPtr åßíáé Ýíáò äåßêôçò óå ìéá ðñïáéñåôéêÞ áõôïáíé÷íåõüìåíç óõíÜñôçóç. Ï ïäçãüò ðñÝðåé íá åßíáé óå ìïñöÞ .BGI. Ì ï í Ü ä á : Graph  ë Ý ð å : GetDriverName

InstallUserFont

(ÓõíÜñôçóç)

Ó ý í ô á î ç : InstallUserFont(FontFileName: string): integer; ÅãêáèéóôÜ Ýíáí ïäçãü ãñáììáôïóåéñÜò ðïõ äåí åßíáé ôçò Borland. Ôï FontFileName äçëþíåé ôï üíïìá ôïõ áñ÷åßïõ ðïõ ðåñéÝ÷åé ðëçñïöïñßåò ãéá ôç ãñáììáôïóåéñÜ. Ì ï í Ü ä á : Graph  ë Ý ð å : InstallUserDriver

Áè. Å. Êïõôóïíéêüëáò


-24Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

Int

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Int(R: real): integer; ÅðéóôñÝöåé ôï áêÝñáéï ìÝñïò ôïõ ïñßóìáôïò R.  ë Ý ð å : Frac, Round, Trunc

Intr

(Äéáäéêáóßá)

Ó ý í ô á î ç : Intr(IntNo: byte; var Regs: Registers); Êáëåß ôç äéáêïðÞ IntNo ôïõ BIOS ìå êáôá÷ùñçôÝò ðïõ ïñßæïíôáé áðü ôçí Regs. Ï ôýðïò Registers ïñßæåôáé óôçí ìïíÜäá Dos ùò åîÞò: type Registers = record case Integer of 0: (AX,BX,CX,DX,BP,SI,DI,DS,ES,Flags: Word); 1: (AL,AH,BL,BH,CL,CH,DL,DH: Byte); end;

Ì ï í Ü ä á : Dos  ë Ý ð å : MsDos

IOResult

(ÓõíÜñôçóç)

Ó ý í ô á î ç : IOResult: word; ÅðéóôñÝöåé ìéá áêÝñáéá ôéìÞ ðïõ åßíáé Ýíáò êùäéêüò óöÜëìáôïò ôçò ôåëåõôáßáò ëåéôïõñãßáò åéóüäïõ/åîüäïõ (I/O) ðïõ åêôåëÝóôçêå. Áí ç IOResult äåí åßíáé ßóç ìå ìçäÝí, ôüôå Ý÷åé óõìâåß êÜðïéï óöÜëìá I/O. Ïé êùäéêïß ôùí ëáèþí ðïõ åðéóôñÝöïíôáé áðü ôçí IOResult öáßíïíôáé ðáñáêÜôù: Êùäéêüò ëÜèïõò Óçìáóßá Äáêáåî.Äåêáä. $02 $03 $04 $05 $06 $0C $0F $10 $11 $64 $65 $66 $67 $68 $69 $6Á $96 $98 $9 $9C $9D $D0 $D1

02 03 04 05 06 12 15 16 17 100 101 102 103 104 105 106 150 152 156 157 158 208 209

Ôï áñ÷åßï äå âñÝèçêå Ç äéáäñïìÞ äå âñÝèçêå ÐïëëÜ áíïéêôÜ áñ÷åßá Áäýíáôç ðñïóðÝëáóç áñ÷åßïõ Áêõñïò ÷åéñéóìüò áñ÷åßïõ Áêõñç ðñïóðÝëáóç áñ÷åßïõ Áêõñï üíïìå ïäçãïý Áäýíáôç áðáëåéöÞ õðïêáôáëüãïõ Ìåôïíïìáóßá áñ÷åßïõ ìå ÷ñÞóç äéáöïñåôéêþí ïäçãþí ËÜèïò êáôÜ ôçí áíÜãíùóç ôïõ äßóêïõ ËÜèïò êáôÜ ôçí åããñáöÞ óôï äßóêï Ôï áñ÷åßï äåí Ý÷åé åê÷ùñçèåß (Assign) óå ìåôáâëçôÞ Ôï áñ÷åßï äåí åßíáé áíïéêôü Ôï áñ÷åßï äåí åßíáé áíïéêôü ãéá áíÜãíùóç Ôï áñ÷åßï äåí åßíáé áíïéêôü ãéá åããñáöÞ Áêõñç áñéèìçôéêÞ öüñìá Ç äéóêÝôá ðñïóôáôåýåôáé áðü åããñáöÞ Ï ïäçãüò äåí åßíáé äéáèÝóéìïò Ãåíéêü ëÜèïò óôç äéóêÝôá Áãíùóôï öïñìÜñéóìá äéóêÝôáò Ï ôïìÝáò äå âñÝèçêå Ï äéá÷åéñéóôÞò áñ÷. åðéêÜë. äåí åßíáé åãêáôåóôçìÝíïò ËÜèïò áíÜãíùóçò áñ÷åßïõ åðéêÜëõøçò

Áè. Å. Êïõôóïíéêüëáò


-25Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

Keep

(Äéáäéêáóßá)

Ó ý í ô á î ç : Keep(ExitCode: word); Ôåñìáôßæåé Ýíá ðñüãñáììá êáé ôï êÜíåé íá ðáñáìÝíåé (öõëÜóóåé) óôç ìíÞìç. ÌåôáâéâÜæåé ôïí êùäéêü åîüäïõ ExitCode óå Ýíáí ôõðéêü êùäéêü óöÜëìáôïò ôïõ DOS. Ì ï í Ü ä á : Dos  ë Ý ð å : DosExitCode

KeyPressed

(ÓõíÜñôçóç)

Ó ý í ô á î ç : KeyPressed: boolean; ÅðéóôñÝöåé áëçèÞ ôéìÞ (TRUE) áí Ý÷åé ðáôçèåß êÜðïéï ðëÞêôñï. ÌïíÜäá: Crt  ë Ý ð å : ReadKey

Length

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Length(S: string): integer; ÅðéóôñÝöåé ôï äõíáìéêü ìÞêïò ôçò óåéñÜò ÷áñáêôÞñùí (string) S.  ë Ý ð å : Concat, Copy, Delete, Insert, Pos

Line

(Äéáäéêáóßá)

Ó ý í ô á î ç : Line(X1, Y1, X2, Y2: integer); Ó÷åäéÜæåé ìéá ãñáììÞ áðü ôï óçìåßï (X1,Y1) ìÝ÷ñé ôï óçìåßï (X2,Y2). Ì ï í Ü ä á : Graph  ë Ý ð å : LineTo, MoveTo, Rectangle, SetColor, SetLineStyle, SetWriteMode

LineRel

(Äéáäéêáóßá)

Ó ý í ô á î ç : LineRel(Dx, Dy: integer); Ó÷åäéÜæåé ìéá ãñáììÞ áðü ôçí ôñÝ÷ïõóá èÝóç ôïõ äåßêôç ïèüíçò ìÝ÷ñé Ýíá óçìåßï ðïõ áðÝ÷åé ó÷åôéêÜ áðü ôçí ôñÝ÷ïõóá èÝóç Dx êïõêêßäåò ïñéæüíôéá êáé Dy êïõêêßäåò êáôáêüñõöá. Ì ï í Ü ä á : Graph ÂëÝðå: Line, LineTo, MoveRel, MoveTo, SetLineStyle, SetWriteMode

LineTo

(Äéáäéêáóßá)

Ó ý í ô á î ç : LineTo(X,Y: integer); Ó÷åäéÜæåé ìéá ãñáììÞ áðü ôçí ôñÝ÷ïõóá èÝóç ôïõ äåßêôç ïèüíçò ìÝ÷ñé ôï óçìåßï (X,Y). Ì ï í Ü ä á : Graph

Áè. Å. Êïõôóïíéêüëáò


-26Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

 ë Ý ð å : Line, LineRel, MoveTo, MoveRel, SetLineStyle, SetWriteMode

Ln

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Ln(var R: real): real; ÅðéóôñÝöåé ôï öõóéêü (ÍåðÝñéï) ëïãÜñéèìï ôïõ R (eR). Ôï R ðñÝðåé íá åßíáé èåôéêü. ÂëÝðå: Exp

Lo

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Lo(I: integer): byte; ÅðéóôñÝöåé ôï byte ÷áìçëÞò ôÜîçò ôïõ ïñßóìáôïò É.  ë Ý ð å : Hi, Swap

LowVideo

(Äéáäéêáóßá)

Ó ý í ô á î ç : LowVideo; Åíåñãïðïéåß ôçí ðáñïõóßáóç ìå ìç Ýíôïíïõò ÷áñáêôÞñåò. Ì ï í Ü ä á : Crt  ë Ý ð å : HighVideo, NormVideo, TextBackground, TextColor

Mark

(Äéáäéêáóßá)

Ó ý í ô á î ç : Mark(var P: pointer); Êáôá÷ùñåß ôçí ôñÝ÷ïõóá äéåýèõíóç êïñõöÞò ôïõ óùñïý óôïí äåßêôç P. Äåí ðñÝðåé íá ÷ñçóéìïðïéåßôáé ìå ôéò FreeMem Þ Dispose.  ë Ý ð å : Dispose, FreeMem, GetMem, New, Release

MaxAvail

(ÓõíÜñôçóç)

Ó ý í ô á î ç : MaxAvail: longint; ÅðéóôñÝöåé ôï ìÝãåèïò ôïõ ìåãáëýôåñïõ áðü ôá åëåýèåñá ôìÞìáôá ìíÞìçò ôïõ óùñïý.  ë Ý ð å : MemAvail

MemAvail

(ÓõíÜñôçóç)

Ó ý í ô á î ç : MemAvail: longint; ÅðéóôñÝöåé ôï óõíïëéêü ìÝãåèïò üëùí ôùí åëåýèåñùí ôìçìÜôùí ìíÞìçò ôïõ óùñïý.  ë Ý ð å : MaxAvail

Áè. Å. Êïõôóïíéêüëáò


-27Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

MkDir

(Äéáäéêáóßá)

Ó ý í ô á î ç : MkDir(S: string); Äçìéïõñãåß óôï äßóêï õðïêáôÜëïãï ìå üíïìá ðïõ äåß÷íåôáé áðü ôç óåéñÜ ÷áñáêôÞñùí (string) S.  ë Ý ð å : RmDir, ChDir, GetDir

Move

(Äéáäéêáóßá)

Ó ý í ô á î ç : Move(var Source, Dest: anytype; Count: word); ÁíôéãñÜöåé Count óõíå÷Þ bytes áñ÷ßæïíôáò áðü ôç äéåýèõíóç ôçò ìåôáâëçôÞò Source, óôçí äéåýèõíóç ôçò ìåôáâëçôÞò Dest.  ë Ý ð å : FillChar

MoveRel

(Äéáäéêáóßá)

Ó ý í ô á î ç : MoveRel(Dx, Dy: integer); Ìåôáêéíåß ôï äåßêôç ôñÝ÷ïõóáò èÝóçò ôçò ïèüíçò, óå ìéá èÝóç ðïõ áðÝ÷åé áðü ôçí ôñÝ÷ïõóá Dx êïõêêßäåò (pixel) ïñéæüíôéá êáé Dy êáôáêüñõöá. Ì ï í Ü ä á : Graph  ë Ý ð å : GetMaxX, GetMaxY, GetX, GetY, MoveRel, MoveTo

MoveTo

(Äéáäéêáóßá)

Ó ý í ô á î ç : MoveTo(X, Y: integer); Ìåôáêéíåß ôï äåßêôç ôñÝ÷ïõóáò èÝóçò ôçò ïèüíçò, óôçí êïõêêßäá (X,Y). Ì ï í Ü ä á : Graph  ë Ý ð å : GetMaxX, GetMaxY, GetX, GetY, MoveRel

MsDos

(Äéáäéêáóßá)

Ó ý í ô á î ç : MsDos(var Regs: register); Åêôåëåß åîõðçñåôÞóåéò ôïõ DOS ÷ñçóéìïðïéþíôáò õðÜñ÷ïõí óôïõò êáôá÷ùñçôÝò Regs. Ì ï í Ü ä á : Dos  ë Ý ð å : Intr

New

ôéò

ôéìÝò

ðïõ

(Äéáäéêáóßá)

Ó ý í ô á î ç : New(var P: pointer); Äåóìåýåé ìíÞìç óôï óùñü ãéá ìéá íÝá äõíáìéêÞ ìåôáâëçôÞ êáé èÝôåé Ýíá äåßêôç P, íá äåß÷íåé óå áõôÞí. Ç áíáöïñÜ óôç ìåôáâëçôÞ ãßíåôáé ìå ^P. Ç ìíÞìç áðïäåóìåýåôáé ìå ôç äéáäéêáóßá Dispose.  ë Ý ð å : Dispose, FreeMem, GetMem, Release

Áè. Å. Êïõôóïíéêüëáò


-28Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

NormVideo

(Äéáäéêáóßá)

Ó ý í ô á î ç : NormVideo; ÅðáíáöÝñåé ôá ÷áñáêôçñéóôéêÜ ôçò ïèüíçò óôçí èÝóç ðïõ âñßóêåôáé ï äñïìÝáò, óôçí êáôÜóôáóç ðïõ Þôáí êáôÜ ôçí åêêßíçóç ôïõ ðñïãñÜììáôïò. Ì ï í Ü ä á : Crt  ë Ý ð å : HighVideo, LowVideo, TextBackground, TextColor

NoSound

(Äéáäéêáóßá)

Ó ý í ô á î ç : NoSound; ÓôáìáôÜ ïðïéïíäÞðïôå Þ÷ï ðïõ ðáñÜãåôáé åêåßíç ôç óôéãìÞ áðü ôï ìåãÜöùíï ôïõ õðïëïãéóôÞ. Ì ï í Ü ä á : Crt  ë Ý ð å : Sound

Odd

(ÓõíÜñôçóç)

Ó ý í ô á î ç Odd(X: longint): boolean; ÅðéóôñÝöåé áëçèÞ ôéìÞ (TRUE) áí ôï áñéèìüò.

Ofs

üñéóìá

×

åßíáé

ðåñéôôüò

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Ofs(Ì): word; ÅðéóôñÝöåé ôç ó÷åôéêÞ äéåýèõíóç (offset) ìÝóá óôï (segment), ìéáò ìåôáâëçôÞò, äéáäéêáóßáò Þ óõíÜñôçóçò.  ë Ý ð å : Addr, Seg

Ord

ôìÞìá

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Ord(S: scalar): longint; ÅðéóôñÝöåé ôïí ôáêôéêü áñéèìü ìéáò âáèìùôïý ôýðïõ.  ë Ý ð å : Chr

OutText

ìåôáâëçôÞò

Þ

óôáèåñÜò,

(Äéáäéêáóßá)

Ó ý í ô á î ç : OutText(TextString: string); ÓôÝëíåé ôç óåéñÜ ÷áñáêôÞñùí TextString óôç óõóêåõÞ åîüäïõ óôçí ôñÝ÷ïõóá èÝóç ôïõ äåßêôç ïèüíçò. Ì ï í Ü ä á : Graph  ë Ý ð å : GetTextSettings, OutTextXY, SetTextJustify, SetTextStyle, SetUserCharSize, TextHeight, TextWidth

Áè. Å. Êïõôóïíéêüëáò


-29Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

OutTextXY

(Äéáäéêáóßá)

Ó ý í ô á î ç : OutTextXY(X,Y: integer; TextString: string); ÓôÝëíåé ôç óåéñÜ ÷áñáêôÞñùí TextString óôç óõóêåõÞ åîüäïõ óôçí èÝóç (X,Y). Ì ï í Ü ä á : Graph  ë Ý ð å : OutText, SetTextStyle, SetUserCharSize, TextHeight, TextWidth

OvrClearBuf

(Äéáäéêáóßá)

Ó ý í ô á î ç : OvrClearBuf; Áðïìáêñýíåé üëåò ôéò åðéêáëõðôüìåíåò ìïíÜäåò áðü ôçí ðåñéï÷Þ ðñïóùñéíÞò áðïèÞêåõóçò áñ÷åßùí åðéêÜëõøçò. Eôóé êÜèå åðüìåíç êëÞóç óå åðéêáëõðôüìåíç äéáäéêáóßá èá ãßíåôáé ìå áíÜãíùóç áðü ôï äßóêï. Ì ï í Ü ä á : Overlay  ë Ý ð å : OvrGetBuf, OvrInit, OvrInitEMS, OvrSetBuf

OvrGetBuf

(ÓõíÜñôçóç)

Ó ý í ô á î ç : OvrGetBuf: longint; ÅðéóôñÝöåé ôï ìÝãåèïò ôçò ðåñéï÷Þò ðñïóùñéíÞò áðïèÞêåõóçò ôùí áñ÷åßùí åðéêÜëõøçò. Ì ï í Ü ä á : Overlay  ë Ý ð å : OvrClearBuff, OvrInit, OvrInitEMS, OvrSetBuf

OvrInit

(Äéáäéêáóßá)

Ó ý í ô á î ç : OvrInit(FileName: string); Åíåñãïðïéåß ôï äéá÷åéñéóôÞ ôùí áñ÷åßùí åðéêÜëõøçò êáé ðñïåôïéìÜæåé ôéò åðéêáëõðôüìåíåò ìïíÜäåò ãéá ÷ñÞóç. Ôï FileName åßíáé ôï üíïìá ôïõ áñ÷åßïõ åðéêÜëõøçò ðïõ áíïßãåôáé. Ì ï í Ü ä á : Overlay  ë Ý ð å : OvrClearBuf, OvrGetBuf, OvrInitEMS, OvrSetBuf

OvrInitEMS

(Äéáäéêáóßá)

Ó ý í ô á î ç : OvrInitEMS; Öïñôþíåé ôï áñ÷åßï åðéêÜëõøçò óôçí åðåêôáìÝíç (expanded) ìíÞìç, áí õðÜñ÷åé äéáèÝóéìç áñêåôÞ ìíÞìç êáé áí ï õðïëïãéóôÞò äéáèÝôåé óýóôçìá åðåêôáìÝìçò ìíÞìçò (EMS=Expanded Memory System). Aí äåí õðÜñ÷åé áñêåôÞ äéáèÝóéìç ìíÞìç, ç åðéêÜëõøç èá ãßíåôáé áðü ôï äßóêï üðùò óõìâáßíåé êáíïíéêÜ. Ì ï í Ü ä á : Overlay  ë Ý ð å : OvrClearBuf, OvrGetBuf, OvrInit, OvrSetBuf

Áè. Å. Êïõôóïíéêüëáò


-30Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

OvrSetBuf

(Äéáäéêáóßá)

Ó ý í ô á î ç : OvrSetBuff(BufSize: integer); ÊáôáíÝìåé ìÝãåèïò ìíÞìçò ßóï ìå BuffSize byte óôçí ðñïóùñéíÞò áðïèÞêåõóçò ôùí áñ÷åßùí åðéêÜëõøçò. Ì ï í Ü ä á : Overlay  ë Ý ð å : OvrClearBuf, OvrGetBuf, OvrInit, OvrInitEMS

PackTime

ðåñéï÷Þ

(Äéáäéêáóßá)

Ó ý í ô á î ç : PackTime(var T: DateTime; var Time: longint); ÅðéóôñÝöåé, óôçí Time, óå óõíåðôõãìÝíç (pack) ìïñöÞ ôçí åããñáöÞ çìåñïìçíßáò-þñáò ðïõ åßíáé êáôá÷ùñçìÝíç óôçí Ô. Ç äïìÞ ôïõ ôýðïõ DateTime üðùò ïñßæåôáé óôçí ìïíÜäá Dos åßíáé: type DateTime = record Year, Month, Day, Hour, Min, Sec: word end;

Ì ï í Ü ä á : Dos  ë Ý ð å : GetFTime, SetFTime, SetTime, UnpackTime

ParamCount

(ÓõíÜñôçóç)

Ó ý í ô á î ç : ParamCount: word; ÅðéóôñÝöåé ôï ðëÞèïò ôùí ìåôáâéâáóèÝíôùí ðáñáìÝôñùí óôï ðñüãñáììá óôç ãñáììÞ äéáôáãþí.  ë Ý ð å : ParamStr

ParamStr

(ÓõíÜñôçóç)

Ó ý í ô á î ç : ParamStr(I: word): string; ÅðéóôñÝöåé ôçí ðáñáìÝôñï ìå áñéèìü É ðïõ åß÷å åéóá÷èåß óôçí ãñáììÞ äéáôáãþí. Ð.÷. ç ParamStr(1) åðéóôñÝöåé ôçí ðñþôç ðáñÜìåôñï.  ë Ý ð å : ParamCount

Pi

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Pi: real; ÅðéóôñÝöåé ôçí ôéìÞ 3.1415926535897932385.

PieSlice

ôçò

óôáèåñÜò

ð,

ðïõ

åßíáé

(Äéáäéêáóßá)

Ó ý í ô á î ç : PieSlice(X, Y: integer; StAngle, EndAngle, Radius: word);

Áè. Å. Êïõôóïíéêüëáò

ßóç

ìå:


-31Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

Ó÷åäéÜæåé êáé ãåìßæåé Ýíá êïììÜôé ðßôáò (êõêëéêü ôïìÝá) áêôßíáò R, áðü ôç ãùíßá StAngle ìÝ÷ñé ôç ãùíßá EndAngle, ÷ñçóéìïðïéþíôáò ôï (X,Y) ùò êÝíôñï. Ì ï í Ü ä á : Graph  ë Ý ð å : Arc, Circle, Ellipse, GetArcCoords, GetAspectRatio, SetFillStyle, SetFillPattern, SetGraphBufSize

Pos

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Pos(SubStr: string; S: string): byte; ÅðéóôñÝöåé ôç èÝóç ðïõ áñ÷ßæåé ç óåéñÜ ÷áñáêôÞñùí SubStr ìÝóá óôçí S. Áí ç SubStr äå âñåèåß ìÝóá óôçí S, ç Pos åðéóôñÝöåé ìçäÝí.  ë Ý ð å : Concat, Copy, Delete, Insert, Length

Pred

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Pred(S: scalar): (ßäéïõ ôýðïõ ìå ôï üñéóìá); ÅðéóôñÝöåé ôçí ôéìÞ ðïõ ðñïçãåßôáé ôïõ ïñßóìáôïò S. Ôï S ðñÝðåé íá åßíáé âáèìùôïý ôýðïõ.  ë Ý ð å : Dec, Inc, Succ

Ptr

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Ptr(Seg, Ofs: word): pointer; ÌåôáôñÝðåé ôç äéåýèõíóç âÜóçò ôìÞìáôïò Seg (segment base) êáé ôç ó÷åôéêÞ äéåýèõíóç ìÝóá óôï ôìÞìá Ofs (offset), óå ôéìÞ ôýðïõ äåßêôç.  ë Ý ð å : Addr

PutImage

(Äéáäéêáóßá)

Ó ý í ô á î ç : PutImage(X, Y: integer; var BitMap; BitBlt: word); Åìöáíßæåé ôá ðåñéå÷üìåíá ôïõ ÷áñôïãñáöçìÝíïõ ãñáöéêïý BitMap áñ÷ßæïíôáò áðü ôï óçìåßï (X,Y). Ôï BitBlt êáèïñßæåé ôç äéáäéêáóßá ðïõ èá ÷ñçóéìïðïéçèåß ãéá ôçí ðáñïõóßáóç êáé ìðïñåß íá ðÜñåé ôéò áêüëïõèåò ôéìÝò üðùò ïñßæïíôáé óôçí ìïíÜäá Graph: const CopyPut = XORPut = OrPut = AndPut = NoPut =

0; 1; 2; 3; 4;

Ì ï í Ü ä á : Graph  ë Ý ð å : GetImage, ImageSize

Áè. Å. Êïõôóïíéêüëáò


-32Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

PutPixel

(Äéáäéêáóßá)

Ó ý í ô á î ç : PutPixel(X, Y: integer; Pixel: word); Ó÷åäéÜæåé ìéá êïõêêßäá (pixel) óôï óçìåßï (X,Y), ìå ÷ñþìá ðïõ êáèïñßæåôáé áðü ôçí Pixel. Ì ï í Ü ä á : Graph  ë Ý ð å : GetImage, GetPixel, PutImage

Random

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Random [ (Range: word) ]: word; ÅðéóôñÝöåé ôõ÷áßï áñéèìü, ìåãáëýôåñï ßóï áðü ôï ìçäÝí êáé ìéêñüôåñï áðü Range. ×ùñßò üñéóìá ç Random åðéóôñÝöåé ôõ÷áßï áñéèìü ìåãáëýôåñï ßóï áðü ôï ìçäÝí êáé ìéêñüôåñï ôïõ Ýíá.  ë Ý ð å : Randomize

Randomize

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Randomize; Äßíåé ôõ÷áßá áñ÷éêÞ ôéìÞ (óðüñï) óôçí ãåííÞôñéá ôõ÷áßùí áñéèìþí. ÁõôÞ ç áñ÷éêÞ ôéìÞ áðïèçêåýåôáé óôçí ìåôáâëçôÞ RandSeed ôýðïõ longInt.  ë Ý ð å : Random

Read

(Äéáäéêáóßá)

Read (ãéá áñ÷åßá ìå ôýðï) Ó ý í ô á î ç : Read(var F: filetype; var V1 [, V2,...,Vn ]: type); ÄéáâÜæåé ìßá Þ ðåñéóóüôåñåò åããñáöÝò ôïõ áñ÷åßïõ ðïõ Ý÷åé ãßíåé Assign ìå ôç ìåôáâëçôÞ áñ÷åßïõ F, óå ìéá Þ ðåñéóóüôåñåò ìåôáâëçôÝò. ÔåëéêÜ ï äåßêôçò áñ÷åßïõ ìåôáêéíåßôáé óôçí åðüìåíç åããñáöÞ áðü áõôÞ ðïõ äéáâÜóôçêå ôåëåõôáßá. Read (ãéá áñ÷åßá êåéìÝíïõ) Ó ý í ô á î ç : Read([ var F: text; ] var V1 [, V2,...,Vn ]: string); ÄéáâÜæåé ìéá Þ ðåñéóóüôåñåò ãñáììÝò áðü Ýíá áñ÷åßï êåéìÝíïõ óå ìéá Þ ðåñéóóüôåñåò ìåôáâëçôÝò.  ë Ý ð å : ReadKey, Readln, Write, Writeln

ReadKey

(ÓõíÜñôçóç)

Ó ý í ô á î ç : ReadKey: char; ÄéáâÜæåé Ýíá ÷áñáêôÞñá áðü ôï ðëçêôñïëüãéï, ÷ùñßò íá ôï ãñÜöåé óôçí ïèüíç. Áí ôï áðïôÝëåóìá åßíáé #0, ôüôå Ý÷åé ðáôçèåß êÜðïéï åéäéêü ðëÞêôñï, ïðüôå ðñÝðåé íá êáëÝóïõìå îáíÜ ôçí ReadKey ãéá íá äéáâÜóåé ôï äåýôåñï ìÝñïò ôïõ êùäéêïý ôïõ ðëÞêôñïõ. Ì ï í Ü ä á : Crt  ë Ý ð å : KeyPressed

Áè. Å. Êïõôóïíéêüëáò


-33Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

Readln

(Äéáäéêáóßá)

Ó ý í ô á î ç : Readln([ var F: text; ] var V1 [, V2,...,Vn ]: string); Åêôåëåß ôç Read êáé ìåôÜ ðñïùèåß ôï äåßêôç áñ÷åßïõ óôçí åðüìåíç ãñáììÞ áðü áõôÞ ðïõ äéáâÜóôçêå ôåëåõôáßá.  ë Ý ð å : Read

Rectangle

(Äéáäéêáóßá)

Ó ý í ô á î ç : Rectangle(X1, Y1, X2, Y2: integer); Ó÷åäéÜæåé ïñèïãþíéï ìå ôï åðéëåãìÝíï åßäïò ãñáììÞò êáé ÷ñùìáôéóìü. Ç ðÜíù áñéóôåñÞ ãùíßá ôïõ ïñèïãùíßïõ âñßóêåôáé óôï óçìåßï (×1,Õ1) êáé ç êÜôù äåîéÜ óôï óçìåßï (×2,Õ2). Ì ï í Ü ä á : Graph  ë Ý ð å : Bar, Bar3D, GetViewSettings, InitGraph, SetColor, SetLineStyle, SetViewPort

RegisterBGIdriver

(ÓõíÜñôçóç)

Ó ý í ô á î ç : RegisterBGIdriver(Driver: pointer): integer; ÅðéôñÝðåé óôïí ÷ñÞóôç íá öïñôþíåé Ýíá áñ÷åßï ïäçãïý .BGI (ôï ïðïßï äéáâÜæåôáé áðü ôï äßóêï êáé ôïðïèåôåßôáé óôï óùñü, Þ óõíäÝåôáé ìÝóá óôï ðñüãñáììá ìå ôï BINOBJ) êáé íá êáôá÷ùñåß ôïí ïäçãü ìå ôï óýóôçìá ãñáöéêþí. Ï Driver åßíáé Ýíáò äåßêôçò ãéá ôç èÝóç ôïõ ïäçãïý .BGI. Áí óõìâåß êÜðïéï óöÜëìá, ç óõíÜñôçóç åðéóôñÝöåé ôéìÞ ìéêñüôåñç áðü ìçäÝí, äéáöïñåôéêÜ åðéóôñÝöåé ôïí áñéèìü ôïõ ïäçãïý ðïõ äüèçêå. Ì ï í Ü ä á : Graph  ë Ý ð å : RegisterBGIfont

RegisterBGIfont

(ÓõíÜñôçóç)

Ó ý í ô á î ç : RegisterBGIfont(Font: pointer): integer; ÅðéôñÝðåé óôïí ÷ñÞóôç íá öïñôþíåé Ýíá áñ÷åßï ïäçãïý ãñáììáôïóåéñÜò .BGI (ôï ïðïßï äéáâÜæåôáé áðü ôï äßóêï êáé ôïðïèåôåßôáé óôï óùñü, Þ óõíäÝåôáé ìÝóá óôï ðñüãñáììá ìå ôï BINOBJ) êáé íá êáôá÷ùñåß ôç ãñáììáôïóåéñÜ ìå ôï óýóôçìá ãñáöéêþí. Ï Font åßíáé Ýíáò äåßêôçò ãéá ôç èÝóç ôïõ ïäçãïý .BGI. Áí óõìâåß êÜðïéï óöÜëìá, ç óõíÜñôçóç åðéóôñÝöåé ôéìÞ ìéêñüôåñç áðü ìçäÝí, äéáöïñåôéêÜ åðéóôñÝöåé ôïí áñéèìü ôçò ãñáììáôïóåéñÜò ðïõ äüèçêå. Ì ï í Ü ä á : Graph  ë Ý ð å : RegisterBGIdriver

Áè. Å. Êïõôóïíéêüëáò


-34Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

Release

(Äéáäéêáóßá)

Ó ý í ô á î ç : Release(var P: pointer); Åëåõèåñþíåé ìíÞìç óùñïý ðïõ åß÷å êáôáíåìçèåß ìå ôç äéáäéêáóßá Mark. Ìå ôçí êëÞóç ôçò Release, ÷Üíïíôáé üëåò ïé ìåôáâëçôÝò ðïõ âñßóêïíôáé óôï óùñü êáé ç ìíÞìç áðåëåõèåñþíåôáé ãéá Üëëåò ÷ñÞóåéò. Äåí ðñÝðåé íá ÷ñçóéìïðïéåßôáé ìå ôçí FreeMem Þ ôç Dispose.  ë Ý ð å : Dispose, FreeMem, GetMem, Mark, New

Rename

(Äéáäéêáóßá)

Ó ý í ô á î ç : Rename(var F: filetype; NewName: string); ÌåôïíïìÜæåé ôï åîùôåñéêü áñ÷åßï, ðïõ Ý÷åé ãßíåé Assign ìå ôç ìåôáâëçôÞ áñ÷åßïõ F, äßíïíôÜò ôïõ ôï üíïìá ðïõ äçëþíåôáé ìå ôç óåéñÜ ÷áñáêôÞñùí (string) NewName.  ë Ý ð å : Erase

Reset

(Äéáäéêáóßá)

Ó ý í ô á î ç : Reset(var F: filetype [; Recsize: word ]); Áíïßãåé ôï õöéóôÜìåíï åîùôåñéêü áñ÷åßï, ðïõ Ý÷åé ãßíåé Assign ìå ôç ìåôáâëçôÞ áñ÷åßïõ F, ãéá áíÜãíùóç êáé ôïðïèåôåß ôï äåßêôç èÝóçò óôçí áñ÷Þ ôïõ áñ÷åßïõ. Áí ôï áñ÷åßï äåí Ý÷åé ôýðï, ìðïñïýìå íá êáèïñßóïõìå ôï ìÝãåèïò ôçò åããñáöÞò ìå ôï Recsize.  ë Ý ð å : Append, Assign, Rewrite, Truncate

RestoreCrtMode

(Äéáäéêáóßá)

Ó ý í ô á î ç : RestoreCrtMode; ÅðáíáöÝñåé ôçí êáôÜóôáóç ôçò ïèüíçò ó'áõôÞí ðïõ Þôáí ðñéí ôçí êëÞóç ôùí ãñáöéêþí. Ì ï í Ü ä á : Graph  ë Ý ð å : CloseGraph, DetectGraph, InitGraph, SetGraphMode

Rewrite

(Äéáäéêáóßá)

Ó ý í ô á î ç : Rewrite(var F: filetype [; Recsize: word ]); ÐñïåôïéìÜæåé ôï åîùôåñéêü áñ÷åßï, ðïõ Ý÷åé ãßíåé Assign ìå ôç ìåôáâëçôÞ áñ÷åßïõ F, ãéá åããñáöÞ. Áí ôï áñ÷åßï äåí õðÜñ÷åé ôüôå äçìéïõñãåßôáé. Áí üìùò õðÜñ÷åé ôá ðåñéå÷üìåíÜ ôïõ êáôáóôñÝöïíôáé. Áí ôï áñ÷åßï äåí Ý÷åé ôýðï, ìðïñïýìå íá êáèïñßóïõìå ôï ìÝãåèïò ôçò åããñáöÞò ìå ôï Recsize.  ë Ý ð å : Append, Assign, Close, Reset, Truncate

Áè. Å. Êïõôóïíéêüëáò


-35Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

RmDir

(Äéáäéêáóßá)

Ó ý í ô á î ç : RmDir(S: string); ÄéáãñÜöåé Ýíá êåíü õðïêáôÜëïãï, ôï üíïìá ôïõ ïðïßïõ ïñßæåôáé óôçí S.  ë Ý ð å : ChDir, GetDir, MkDir

Round

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Round(R: real): longint; ÅðéóôñÝöåé Ýíáí áêÝñáéï ðïõ ðñïÝñ÷åôáé áðü óôñïããõëïðïßçóç ôïõ ïñßóìáôïò R.  ë Ý ð å : Trunc, Int

RunError

(Äéáäéêáóßá)

Ó ý í ô á î ç : RunError [ ( ErrorCode: word ) ]; ÓôáìáôÜ ôçí åêôÝëåóç ôïõ ðñïãñÜììáôïò, äçìéïõñãþíôáò Ýíá óöÜëìá êáôÜ ôï ÷ñüíï åêôÝëåóçò. Áí ðåñéëáìâÜíåôáé êáé ï êùäéêüò óöÜëìáôïò, ôüôå ç T.Pascal èá ôï èåùñÞóåé óáí ôï åßäïò ôïõ óöÜëìáôïò ðïõ óõíÝâç êáôÜ ôï ÷ñüíï åêôÝëåóçò.  ë Ý ð å : Exit, Halt

Sector

(Äéáäéêáóßá)

Ó ý í ô á î ç : Sector(X, Y: integer; StAngle, EndAngle, XRadius, YRadius: word); Ó÷åäéÜæåé Ýíáí êõêëéêü Þ åëëåéðôéêü ôïìÝá ìå êÝíôñï ôï óçìåßï (×,Õ), ðïõ áñ÷ßæåé áðü ôç ãùíßá StAngle, ôåëåéþíåé óôçí ãùíßá EndAngle êáé Ý÷åé ïñéæüíôéá áêôßíá XRadius êáé êáôáêüñõöç YRadius. Ì ï í Ü ä á : Graph  ë Ý ð å : Arc, Circle, Ellipse, GetArcCoords, GetAspectRatio, SetFillPattern, SetFillStyle, SetGraphBufSize

Seek

(Äéáäéêáóßá)

Ó ý í ô á î ç : Seek(var F: filetype; N: longint); Ìåôáêéíåß ôï äåßêôç ôïõ áñ÷åßïõ F óôçí áñ÷Þ ôçò åããñáöÞò ôïõ ìå áñéèìü Í. Ç ðñþôç åããñáöÞ Ý÷åé áñéèìü ìçäÝí.  ë Ý ð å : FilePos

Áè. Å. Êïõôóïíéêüëáò


-36Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

SeekEof

(ÓõíÜñôçóç)

Ó ý í ô á î ç : SeekEof [ (var F: filetype) ]: boolean; Åßíáé ðáñüìïéá ìå ôçí Eof, ìå ôç äéáöïñÜ üôé êáôÜ ôçí áíáæÞôçóç ôïõ ôÝëïõò áñ÷åßïõ ðáñáëåßðåé ôá êåíÜ äéáóôÞìáôá êáé ôïõò ÷áñáêôÞñåò ôÝëïõò ãñáììÞò.  ë Ý ð å : Eof, SeekEoln

SeekEoln

(ÓõíÜñôçóç)

Ó ý í ô á î ç : SeekEoln [ (var F: text) ]: boolean; Åßíáé ðáñüìïéá ìå ôçí Eoln, ìå ôç äéáöïñÜ üôé, ðñéí åëÝãîåé ãéá ôï ôÝëïò ãñáììÞò, ðáñáëåßðåé ôá êåíÜ äéáóôÞìáôá.  ë Ý ð å : Eoln, SeekEof

Seg

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Seg(Ì): word; ÅðéóôñÝöåé ôç äéåýèõíóç ôìÞìáôïò äéáäéêáóßáò Þ óõíÜñôçóçò.  ë Ý ð å : Ofs, Addr

SetActivePage

(segment),

ìéáò

ìåôáâëçôÞò,

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetActivePage(Page: word); Ïñßæåé ôçí åíåñãü óåëßäá ãéá Ýîïäï ãñáöéêþí. Ì ï í Ü ä á : Graph  ë Ý ð å : SetVisualPage

SetAllPalette

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetAllPalette(var Palette: PaletteType); ÁëëÜæåé üëåò ôéò ðáëÝôåò ÷ñùìÜôùí ì'áõôÞí ðïõ êáèïñßæåôáé áðü ôçí PaletteType. Ç äïìÞ ôïõ ôýðïõ PaletteType üðùò ïñßæåôáé óôçí ìïíÜäá Graph åßíáé: const MaxColors = 15; type PaletteType = record Size: byte; Colors: array[0..MaxColors] of shortint end;

Ì ï í Ü ä á : Graph  ë Ý ð å : GetBkColor, GetColor, GetPalette, GraphResult, SetBkColor, SetColor, SetPalette

Áè. Å. Êïõôóïíéêüëáò


-37Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

SetAspectRatio

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetAspectRatio(Xasp, Yasp: word); ÁëëÜæåé ôï ëüãï èÝáóçò êáé ôïí êÜíåé ßóï ìå Xasp/Yasp Ì ï í Ü ä á : Graph  ë Ý ð å : GetAspectRatio

SetBkColor

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetBkColor(ColorNum: word); Ïñßæåé ôï ðñïåðéëåãìÝíï ÷ñþìá öüíôïõ ãéá ôïí ôñüðï ëåéôïõñãßáò ãñáöéêþí ÷ñçóéìïðïéþíôáò Ýíá ÷ñþìá ColorNum áðü ôçí ôñÝ÷ïõóá ðáëÝôá. Ì ï í Ü ä á : Graph  ë Ý ð å : GetBkColor, GetColor, GetPalette, SetAllPalette, SetColor, SetPalette

SetCBreak

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetCBreak(Break: boolean); Åíåñãïðïéåß (üôáí Break=TRUE) Þ áðåíåñãïðïéåß (üôáí Break=FALSE) ôï óõíäõáóìü ôùí ðëÞêôñùí Ctrl-Break. Ì ï í Ü ä á : Dos  ë Ý ð å : GetCBreak

SetColor

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetColor(Color: word); Ïñßæåé ôï ÷ñþìá Color ôçò ôñÝ÷ïõóáò ðáëÝôáò ùò ôï ôñÝ÷ïí ÷ñþìá ó÷åäßáóçò. Ì ï í Ü ä á : Graph  ë Ý ð å : DrawPoly, GetBkColor, GetColor, GetPalette, SetAllPalette, SetBkColor, SetPalette

SetDate

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetDate(Year, Month, Day: word); ÈÝôåé óôï ñïëüé ôïõ óõóôÞìáôïò ôçí çìåñïìçíßá (Åôïò, ÌÞíá, ÇìÝñá) ðïõ ïñßæåôáé áðü ôéò ðáñáìÝôñïõò (Year, Month, Day áíôßóôïé÷á). Ïé ôéìÝò ôùí ðáñáìÝôñùí ðñÝðåé íá âñßóêïíôáé óôéò ðåñéï÷Ýò 1980..2099, 1..12, 1..31 áíôßóôïé÷á. Óå ðåñßðôùóç ðïõ äïèåß Üêõñç ôéìÞ ðáñáìÝôñïõ, ç çìåñïìçíßá ôïõ óõóôÞìáôïò ðáñáìÝíåé áìåôÜâëçôç. Ì ï í Ü ä á : Dos  ë Ý ð å : GetDate, GetTime, SetTime

Áè. Å. Êïõôóïíéêüëáò


-38Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

SetFAttr

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetFAttr(var F: filetype; Attr: word); Ïñßæåé ôéò éäéüôçôåò åíüò áñ÷åßïõ ðïõ Ý÷åé ãßíåé Assign ìå ôç ìåôáâëçôÞ áñ÷åßïõ F. Ðñéí êáëÝóïõìå áõôÞ ôç äéáäéêáóßá, ôï F äåí ðñÝðåé íá Ý÷åé áíïé÷èåß. Ãéá ôéò ôéìÝò ôïõ Attr âëÝðå ôç äéáäéêáóßá FindFirst. Ì ï í Ü ä á : Dos  ë Ý ð å : FindFirst, GetFAttr, GetFTime, SetFTime

SetFillPattern

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetFillPattern(Pattern: FillPatternType; Color: word); Ïñßæåé ôï ó÷Ýäéï ãñáöéêþí Pattern ðïõ ÷ñçóéìïðïéåßôáé ãéá ôï ãÝìéóìá ôìçìÜôùí ôçò ïèüíçò ìå äéáäéêáóßåò üðùò ç FloodFill êáé FillPoly. Ì ï í Ü ä á : Graph  ë Ý ð å : Bar, Bar3D, FillPoly, FloodFill, GetFillPattern, GetFillSettings, GraphResult, PieSlice

SetFillStyle

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetFillStyle(Pattern: word; Color: word); Ïñßæåé ôï ó÷Ýäéï ãñáöéêþí (Pattern) êáé ôï ÷ñþìá (Color), ðïõ ÷ñçóéìïðïéåßôáé ãéá ôï ãÝìéóìá ôìçìÜôùí ôçò ïèüíçò. Ïé êùäéêïß ãéá ôï ó÷Ýäéï ãñáöéêþí, üðùò ïñßæïíôáé óôçí ìïíÜäá Graph åßíáé: const EmptyFill SolidFill LineFill LtSlashFill SlashFill BkSlashFill LtBkSlashFill HatchFill XHatchFill InterleaveFill WideDotFill CloseDotFill UserFill

= = = = = = = = = = = = =

0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12;

{ { { { { { { { { { { { {

fills area in background color } fills area in solid fill color } --- fill } /// fill } /// fill with thick lines } \\\ fill with thick lines } \\\ fill } light hatch fill } heavy cross hatch fill } interleaving line fill } Widely spaced dot fill } Closely spaced dot fill } user defined fill }

Ì ï í Ü ä á : Graph  ë Ý ð å : Bar, Bar3D, FillPoly, GetFillSettings, PieSlice, SetFillPattern

SetFTime

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetFTime(var F: filetype; Time: longint); Ïñßæåé ôçí çìåñïìçíßá êáé þñá ôçò ôåëåõôáßáò åíçìÝñùóçò ôïõ áñ÷åßïõ, ðïõ Ý÷åé ãßíåé Assign ìå ôç ìåôáâëçôÞ áñ÷åßïõ F, ßóç ìå ôçí ôéìÞ ôçò Time. Ç Time äçìéïõñãåßôáé ìå ôç äéáäéêáóßá PackTime.

Áè. Å. Êïõôóïíéêüëáò


-39Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

Ì ï í Ü ä á : Dos  ë Ý ð å : GetFTime, PackTime, SetFAttr, UnpackTime

SetGraphBufSize

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetGraphBuffSize(BuffSize: word); Ïñßæåé ôï ìÝãåèïò ôçò ðåñéï÷Þò ðñïóùñéíÞò áðïèÞêåõóçò óôçí ìíÞìç, ßóï ìå BuffSize. Ì ï í Ü ä á : Graph  ë Ý ð å : SetTextBuf

SetGraphMode

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetGraphMode(Mode: integer); Ïñßæåé ôïí ôñÝ÷ïíôá ôñüðï ëåéôïõñãßáò ãñáöéêþí üðùò êáèïñßæåôáé áðü ôçí Mode. Ì ï í Ü ä á : Graph  ë Ý ð å : ClearDevice, CloseGraph, DetectGraph, GetGraphMode, GraphResult, InitGraph, RestoreCrtMode

SetIntVec

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetIntVec(IntNo: byte; Vector: pointer); Ôïðïèåôåß ôçí ôéìÞ ôïõ äéáíýóìáôïò Vector óôçí äéáêïðÞ IntNo óôïí ðßíáêá äéáíõóìÜôùí äéáêïðÞò. Ì ï í Ü ä á : Dos  ë Ý ð å : GetIntVec

SetLineStyle

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetLineStyle(LineStyle: word; Pattern: word; Thickness: word); Êáèïñßæåé ôïí ôýðï (LineStyle), ôï ó÷Ýäéï (Pattern) êáé ôï ðÜ÷ïò (Thickness) ôùí ãñáììþí ðïõ ó÷åäéÜæïíôáé óôïí ôñüðï ëåéôïõñãßáò ãñáöéêþí. Ïé êùäéêïß ãéá ôïí ôýðï êáé ôï ðÜ÷ïò üðùò ïñßæïíôáé óôçí ìïíÜäá Graph åßíáé: const SolidLn DottedLn CenterLn DashedLn UserBitLn NormWidth ThickWidth

= = = = = = =

0; 1; 2; 3; 4; 1; 3;

Ì ï í Ü ä á : Graph  ë Ý ð å : DrawPoly, GraphResult, Line

Áè. Å. Êïõôóïíéêüëáò


-40Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

SetPalette

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetPalette(ColorNum: word; Color: shortint); ÁëëÜæåé óôçí ôñÝ÷ïõóá ðáëÝôá ôï ÷ñþìá ðïõ êáèïñßæåôáé áðü ôï ColorNum ìå áõôü ðïõ ïñßæåôáé áðü ôï Color. Ïé êùäéêïß ôùí ÷ñùìÜôùí üðùò ïñßæïíôáé óôçí ìïíÜäá Graph åßíáé: const Black = Blue = Green = Cyan = Red = Magenta = Brown = LightGray =

0; 1; 2; 3; 4; 5; 6; 7;

DarkGray LightBlue LightGreen LightCyan LightRed LightMagenta Yellow White

= = = = = = = =

8; 9; 10; 11; 12; 13; 14; 15;

Ì ï í Ü ä á : Graph  ë Ý ð å : GetBkColor, GetColor, GetPalette, GraphResult, SetAllPalette, SetBkColor,SetColor, SetRGBPalette

SetRBGPalette

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetRBGPalette(ColorNum, RedValue, GreenValue, BlueValue: integer); Ïñßæåé ôï ÷ñþìá ìå áñéèìü ColorNum ôçò ðáëÝôáò ìå ïðïéïíäÞðïôå óõíäõáóìü ôïõ êüêêéíïõ, ðñÜóéíïõ êáé ìðëå. Ì ï í Ü ä á : Graph  ë Ý ð å : SetBkColor, SetColor

SetTextBuf

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetTextBuf(var F: text; var Buf [; Size: word ] ); Áðïäßäåé ôï áñ÷åßï êåéìÝíïõ F óôçí ðåñéï÷Þ ðñïóùñéíÞò áðïèÞêåõóçò Buff. Áí äåí êáèïñßæåôáé ôï ìÝãåèïò Size, ôüôå ôï ìÝãåèïò ôçò ðåñéï÷Þò ðñïóùñéíÞò áðïèÞêåõóçò èá åßíáé ßóï ìå áõôü ôïõ Buff. Eôóé ôï Size ìðïñåß íá ÷ñçóéìïðïéçèåß ãéá ôçí õðÝñâáóç ôïõ ðñïåðéëåãìÝíïõ ìåãÝèïõò ôçò ðåñéï÷Þò ðñïóùñéíÞò áðïèÞêåõóçò.  ë Ý ð å : Read

SetTextJustify

(Äéáäéêáóßá)

Ó ý í ô á î ç SetTextJustify(Horiz, Vert: word); Ïñßæåé ôéìÝò óôïß÷éóçò êåéìÝíïõ ðïõ ÷ñçóéìïðïéïýíôáé áðü ôéò OutText êáé OutTextXY. Ïé ôéìÝò ãéá ôéò Horiz êáé Vert, üðùò ïñßæïíôáé óôçí ìïíÜäá Graph åßíáé: const { ãéá ôçí Horiz } LeftText = 0; CenterText = 1; RightText = 2; { ãéá ôçí Vert } BottomText = 0;

Áè. Å. Êïõôóïíéêüëáò


-41Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL CenterText = 1; TopText = 2;

Ì ï í Ü ä á : Graph  ë Ý ð å : GetTextSettings, GraphResult, OutText, OutTextXY, SetLineStyle,TextHeight, TextWidth

SetTextStyle

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetTextStyle(Font, Direction, CharSize: word); Êáèïñßæåé ôçí ôñÝ÷ïõóá ãñáììáôïóåéñÜ êåéìÝíïõ (Font), ôçí êáôåýèõíóç ðáñïõóßáóçò(Direction) êáé ôï ìÝãåèïò ôùí ÷áñáêôÞñùí (CharSize), óôïí ôñüðï ëåéôïõñãßáò ãñáöéêþí. H ãñáììáôïóåéñÜ ìðïñåß íá ðÜñåé ôéìÝò áðü 0 (ãéá ôçí default - ðñïåðéëåãìÝíç) ìÝ÷ñé 4 (Gothic). Ç êáôåýèõíóç ìðïñåß íá ðÜñåé ôéò ôéìÝò 0 (ïñéæüíôéá) êáé 1 (êáôáêüñõöç). Ôï ìÝãåèïò ìðïñåß íá ðÜñåé ôéìÝò áðü 1 ìÝ÷ñé 10. Ì ï í Ü ä á : Graph  ë Ý ð å : GetTextSettings, GraphResult, OutText, OutTextXY, SetTextJustify,SetUserCharSize, TextHeight, TextWidth

SetTime

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetTime(Hour, Minute, Second, Sec100: word); ÈÝôåé óôï ñïëüé ôïõ óõóôÞìáôïò ôçí þñá (þñåò, ëåðôÜ, äåõôåñüëåðôá êáé åêáôïóôÜ ôïõ äåõôåñïëÝðôïõ) ðïõ ïñßæåôáé áðü ôéò ðáñáìÝôñïõò (Hour, Minute, Second êáé Sec100 áíôßóôïé÷á). Ïé ôéìÝò ôùí ðáñáìÝôñùí ðñÝðåé íá âñßóêïíôáé óôéò ðåñéï÷Ýò 0..23, 0..59, 0..59 êáé 0..99 áíôßóôïé÷á. Óå ðåñßðôùóç ðïõ äïèåß Üêõñç ôéìÞ ðáñáìÝôñïõ, ç þñá ôïõ óõóôÞìáôïò ðáñáìÝíåé áìåôÜâëçôç. Ì ï í Ü ä á : Dos  ë Ý ð å : GetDate, GetTime, PackTime, SetDate, UnPackTime

SetUserCharSize

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetUserCharSize(MultX, DivX, MultY, DivY: word); ÌåôáâÜëëåé ôéò áíáëïãßåò ðëÜôïõò êáé ýøïõò ãéá ôéò äéáíõóìáôéêÝò ãñáììáôïóåéñÝò. Ð.÷. áí ç MultX åßíáé 1 êáé ç DivX åßíáé 2, ïé ÷áñáêôÞñåò èá ðáñïõóéáóôïýí ìå ôï ìéóü áðü ôï êáíïíéêü ôïõò ðëÜôïò. Ì ï í Ü ä á : Graph  ë Ý ð å : SetTextStyle

Áè. Å. Êïõôóïíéêüëáò


-42Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

SetVerify

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetVerify(Verify: boolean); Åíåñãïðïéåß (üôáí Verify = TRUE) Þ áðåíåñãïðïéåß (üôáí Verify = FALSE) ôçí åðáëÞèåõóç åããñáöÞò óå äßóêï. Ì ï í Ü ä á : Dos  ë Ý ð å : GetVerify

SetViewPort

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetViewPort(X1, Y1, X2, Y2: integer; Clip: boolean); ÅðéëÝãåé Ýíá ïñèïãþíéï ôìÞìá ôçò ïèüíçò (ç ðÜíù áñéóôåñÜ ãùíßá ôïõ ïðïßïõ âñßóêåôáé óôï óçìåßï (×1,Õ1) êáé ç êÜôù äåîéÜ óôï (×2,Õ2)) ãéá íá ôï ÷ñçóéìïðïéÞóåé óáí åíåñãÞ ïèüíç. Ïôáí ç Clip åßíáé áëçèÞò (TRUE) ôüôå ôá ó÷Ýäéá áðïêüðôïíôáé óôá üñéá ôïõ ðáñáèýñïõ. Ì ï í Ü ä á : Graph  ë Ý ð å : ClearViewPort, GetViewSettings, GraphResult

SetVisualPage

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetVisualPage(Page: word); Ïñßæåé ôçí ïñáôÞ óåëßäá ãñáöéêþí. Ì ï í Ü ä á : Graph  ë Ý ð å : SetActivePage

SetWriteMode

(Äéáäéêáóßá)

Ó ý í ô á î ç : SetWriteMode(WriteMode: intrger); Êáèïñßæåé ôïí Ýíáí áðü ôïõò äýï ôñüðïõò ó÷åäßáóçò ãñáììþí. Áí ç ðáñÜìåôñïò WriteMode ðÜñåé ôéìÞ 0, ðïõ áíôéóôïé÷åß óôçí óôáèåñÜ CopyPut, ïé ãñáììÝò ó÷åäéÜæïíôáé ìå ôçí åíôïëÞ MOV ôçò assembly. Áí ç ßäéá ðáñÜìåôñïò ðÜñåé ôçí ôéìÞ 1, ðïõ áíôéóôïé÷åß óôçí óôáèåñÜ XORPut, ïé ãñáììÝò ó÷åäéÜæïíôáé ìå ôç ëïãéêÞ ðñÜîç XOR. Ì ï í Ü ä á : Graph

Sin

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Sin(R: real): real; ÅðéóôñÝöåé ôï çìßôïíï ôïõ ïñßóìáôïò. To üñéóìá èá ðñÝðåé íá åßíáé ãùíßá (ôüîï) óå áêôßíéá.  ë Ý ð å : ArcTan, Cos

Áè. Å. Êïõôóïíéêüëáò


-43Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

SizeOf

(ÓõíÜñôçóç)

Ó ý í ô á î ç : SizeOf(M: anytype): word; ÅðéóôñÝöåé ôïí áñéèìü ôùí êáôáëáìâáíïìÝíùí bytes áðü ôï üñéóìá M.

Sound

(Äéáäéêáóßá)

Ó ý í ô á î ç : Sound(Hz: word); ÐáñÜãåé Ýíáí Þ÷ï áðü ôï ìåãÜöùíï ôïõ õðïëïãéóôÞ, ìå óõ÷íüôçôá Hz. Ï Þ÷ïò óõíå÷ßæåôáé ìÝ÷ñé íá åêôåëåóôåß ç äéáäéêáóßá NoSound.  ë Ý ð å : NoSound

SPtr

(ÓõíÜñôçóç)

Ó ý í ô á î ç : SPtr: word; ÅðéóôñÝöåé ôçí ôñÝ÷ïõóá ôéìÞ ôïõ êáôá÷ùñçôÞ äåßêôç óôïßâáò (SP).  ë Ý ð å : SSeg

Sqr

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Sqr(R: integer Þ real): (ßäéïõ ôýðïõ ìå ôï üñéóìá); ÅðéóôñÝöåé ôï ôåôñÜãùíï ôïõ ïñßóìáôïò R.  ë Ý ð å : Sqrt

Sqrt

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Sqrt(R: integer Þ real): real; ÅðéóôñÝöåé ôçí ôåôñáãùíéêÞ ñßæá ôïõ ïñßóìáôïò R. Ôï R ðñÝðåé íá åßíáé èåôéêüò áñéèìüò. ÂëÝðå: Sqr

SSeg

(ÓõíÜñôçóç)

Ó ý í ô á î ç : SSeg: word; ÅðéóôñÝöåé ôçí ôñÝ÷ïõóá (SS).  ë Ý ð å : CSeg, DSeg, SPtr

Str

ôéìÞ

ôïõ

êáôá÷ùñçôÞ

ôìÞìáôïò

óôïßâáò

(Äéáäéêáóßá)

Ó ý í ô á î ç : Str(X [:width [: decimals ]]: numtypes; var S: string); ÌåôáôñÝðåé ìéá áñéèìçôéêÞ ôéìÞ X, óå óåéñÜ ÷áñáêôÞñùí (string) S. Ôï ðëÜôïò ðåäßïõ (width) êáé ôï ìÞêïò êëÜóìáôïò (decimals) Ý÷ïõí ôïí ßäéï ñüëï ðïõ Ý÷ïõí óôéò Write êáé Writeln.  ë Ý ð å : Val, Write

Áè. Å. Êïõôóïíéêüëáò


-44Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

Succ

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Succ(S: scalar): (ßäéïõ ôýðïõ ìå ôï üñéóìá); ÅðéóôñÝöåé ôçí ôéìÞ ðïõ Ýðåôáé ôïõ ïñßóìáôïò S. Ôï S ðñÝðåé íá åßíáé âáèìùôïý ôýðïõ.  ë Ý ð å : Inc, Pred

Swap

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Swap(Ì): (ßäéïõ ôýðïõ ìå ôï üñéóìá); ÅíáëëÜóóåé ôá bytes õøçëÞò êáé ÷áìçëÞò ôÜîçò ôïõ ïñßóìáôïò M.  ë Ý ð å : Hi, Lo

SwapVectors

(Äéáäéêáóßá)

Ó ý í ô á î ç : SwapVectors; ÅíáëëÜóóåé ôéò ôñÝ÷ïõóåò ôéìÝò ôïõ ðßíáêá äéáíõóìÜôùí äéáêïðþí ì'áõôÝò ðïõ åß÷áí áðïèçêåõôåß ôç óôéãìÞ ðïõ îåêßíçóå ç åêôÝëåóç ôïõ ðñïãñÜììáôïò. Ì ï í Ü ä á : Dos  ë Ý ð å : Exec

TextBackground

(Äéáäéêáóßá)

Ó ý í ô á î ç : TextBackground(Color: byte); ÅðéëÝãåé ôï ÷ñþìá öüíôïõ, ðïõ êáèïñßæåôáé áðü ôçí Color. Ïé êùäéêïß ôùí ÷ñùìÜôùí öüíôïõ üðùò ïñßæïíôáé óôçí ìïíÜäá Crt åßíáé: const Black = Blue = Green = Cyan = Red = Magenta = Brown = LightGray =

0; 1; 2; 3; 4; 5; 6; 7;

Ì ï í Ü ä á : Crt  ë Ý ð å : TextColor

TextColor

(Äéáäéêáóßá)

Ó ý í ô á î ç : TextColor(Color: byte); ÅðéëÝãåé ôï ÷ñþìá ìåëÜíçò, ðïõ êáèïñßæåôáé áðü ôçí Color. Ïé êùäéêïß ôùí ÷ñùìÜôùí ìåëÜíçò üðùò ïñßæïíôáé óôçí ìïíÜäá Crt åßíáé: const Black Blue Green Cyan

= = = =

0; 1; 2; 3;

DarkGray LightBlue LightGreen LightCyan

= = = =

8; 9; 10; 11;

Áè. Å. Êïõôóïíéêüëáò


-45Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL Red = Magenta = Brown = LightGray =

4; 5; 6; 7;

LightRed LightMagenta Yellow White

= = = =

12; 13; 14; 15;

Ì ï í Ü ä á : Crt  ë Ý ð å : HighVideo, LowVideo, NormVideo, TextBackround

TextHeight

(ÓõíÜñôçóç)

Ó ý í ô á î ç : TextHeight(TextString: string): word; ÅðéóôñÝöåé ôï ýøïò ôçò óåéñÜò ÷áñáêôÞñùí (string) TextString, óå êïõêêßäåò (pixels). Ì ï í Ü ä á : Graph  ë Ý ð å : OutText, OutTextXY, SetTextStyle, TextWidth

TextMode

(Äéáäéêáóßá)

Ó ý í ô á î ç : TextMode(Mode: integer); ÅðéëÝãåé Ýíáí áðü ôïõò ôñüðïõò ëåéôïõñãßáò ôçò ïèüíçò êåéìÝíïõ ðïõ õðïóôçñßæåé ç T.Pascal. ×ùñßò ðáñÜìåôñï ç TextMode åðáíáöÝñåé ôçí ïèüíç óôçí ðñïçãïýìåíÞ ôçò ñýèìéóç. Ç Mode ìðïñåß íá åßíáé åßôå ï áêÝñáéïò êùäéêüò åßôå ç ðñïêáèïñéóìÝíç óôáèåñÜ áðü ôïí ðßíáêá ðïõ áêïëïèåß: ÓôáèåñÜ ÔéìÞ ÐëÜôïò ÊÜñôá BW40 CO40 BW80 CO80 Mono Font8x8

0 1 2 3 7 256

40x25 40x25 80x25 80x25 80x25 80x43/50

Ìïíü÷ñùìç CGA Åã÷ñùìç CGA Ìïíü÷ñùìç CGA Åã÷ñùìç CGA Ìïíü÷ñùìç Hercules EGA/VGA

Ì ï í Ü ä á : Crt

TextWidth

(ÓõíÜñôçóç)

Ó ý í ô á î ç : TextWidth(TextString: string): word; ÅðéóôñÝöåé ôï ðëÜôïò ôçò óåéñÜò ÷áñáêôÞñùí (string) TextString, óå êïõêêßäåò (pixels). Ì ï í Ü ä á : Graph  ë Ý ð å : OutText, OutTextXY, SetTextStyle, TextHeight

Trunc

(ÓõíÜñôçóç)

Ó ý í ô á î ç : Trunc(R: real): longint; ÅðéóôñÝöåé Ýíáí áêÝñáéï ðïõ ðñïÝñ÷åôáé áðü áðïêïðÞ ôùí äåêáäéêþí øçößùí ôïõ ïñßóìáôïò, ÷ùñßò óôñïããõëïðïßçóç.  ë Ý ð å : Int, Round

Áè. Å. Êïõôóïíéêüëáò


-46Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

Truncate

(Äéáäéêáóßá)

Ó ý í ô á î ç : Truncate(var F: file); Áðïêüðôåé ôï áñ÷åßï, ðïõ Ý÷åé ãßíåé Assign ìå ôç ìåôáâëçôÞ áñ÷åßïõ F, óôçí ôñÝ÷ïõóá èÝóç ôïõ äåßêôç áñ÷åßïõ. Ôá ðåñéå÷üìåíá ôïõ áñ÷åßïõ ìåôÜ ôï äåßêôç ÷Üíïíôáé.  ë Ý ð å : Reset, Rewrite, Seek

TypeOf

(ÓõíÜñôçóç)

Ó ý í ô á î ç : TypeOf(áíôéêåßìåíï): pointer; ÅðéóôñÝöåé Ýíá äåßêôç ãéá ôïí ðßíáêá õðåñâáôéêþí ìåèüäùí åíüò ôýðïõ áíôéêåéìÝíïõ. Ç óõíÜñôçóç äÝ÷åôáé åßíáé üñéóìá, ðïõ ìðïñåß íá åßíáé åßôå áíáãíùñéóôéêü ôýðïõ áíôéêåéìÝíïõ Þ êáé ðåñßðôùóç åíüò áíôéêåéìÝíïõ. Ç êýñéá ÷ñÞóç ôçò TypeOf åßíáé íá êáèïñßæåé áí äýï áíôéêåßìåíá (Þ Ýíáò ôýðïò áíôéêåéìÝíïõ êáé ìéá ðåñßðôùóç áíôéêåéìÝíïõ) Ý÷ïõí ôïí ßäéï ôýðï.

UnPackTime

(Äéáäéêáóßá)

Ó ý í ô á î ç : UnpackTime(Time: longint; var T: DateTime); ÌåôáôñÝðåé ôçí åããñáöÞ çìåñïìçíßáò êáé þñáò ðïõ õðÜñ÷åé óôçí Time óå áðïóõìðôõãìÝíç ìïñöÞ óôçí Ô. Ç äïìÞ ôïõ ôýðïõ DateTime üðùò ïñßæåôáé óôçí ìïíÜäá Dos åßíáé: type DateTime = record Year, Month, Day, Hour, Min, Sec: word end;

Ì ï í Ü ä á : Dos  ë Ý ð å : GetFTime, GetTime, PackTime, SetFTime, SetTime

UpCase

(ÓõíÜñôçóç)

Ó ý í ô á î ç : UpCase(Ch: char): char; ÅðéóôñÝöåé ôï êåöáëáßï ëáôéíéêü ãñÜììá ðïõ áíôéóôïé÷åß óôï ðåæü ëáôéíéêü ãñÜììá Ch.

Val

(Äéáäéêáóßá)

Ó ý í ô á î ç : Val(S: string; var V: numtypes; var Code: integer); ÌåôáôñÝðåé ôç óåéñÜ ÷áñáêôÞñùí (string) S óå áñéèìçôéêÞ ôéìÞ áêÝñáéá Þ ðñáãìáôéêÞ. Áí ç ìåôáôñïðÞ åßíáé åðéôõ÷Þò, ôüôå Code=0, äéáöïñåôéêÜ ç Code èá ðåñéÝ÷åé Ýíáí áêÝñáéï ðïõ áíôéðñïóùðåýåé ôï ÷áñáêôÞñá ðïõ óõíÝâç ëÜèïò ìÝóá óôçí óåéñÜ ÷áñáêôÞñùí.  ë Ý ð å : Str

Áè. Å. Êïõôóïíéêüëáò


-47Äéáäéêáóßåò êáé ÓõíáñôÞóåéò ôçò TURBO PASCAL

WhereX

(ÓõíÜñôçóç)

Ó ý í ô á î ç : WhereX: byte; ÅðéóôñÝöåé ôçí ôåôìçìÝíç X ôçò ôñÝ÷ïõóáò èÝóçò äñïìÝá, ìÝóá óôï ôñÝ÷ïí ðáñÜèõñï. Ì ï í Ü ä á : Crt  ë Ý ð å : GotoXY, WhereY, Window

WhereY

(ÓõíÜñôçóç)

Ó ý í ô á î ç : WhereY: byte; ÅðéóôñÝöåé ôçí ôåôáãìÝíç Y ôçò ôñÝ÷ïõóáò èÝóçò äñïìÝá, ìÝóá óôï ôñÝ÷ïí ðáñÜèõñï. Ì ï í Ü ä á : Crt  ë Ý ð å : GotoXY, WhereX, Window

Window

(Äéáäéêáóßá)

Ó ý í ô á î ç : Window(X1, Y1, X2, Y2: byte); Êáèïñßæåé Ýíá ðáñÜèõñï êåéìÝíïõ óôçí ïèüíç. Ç ðÜíù áñéóôåñÞ ãùíßá ôïõ ðáñáèýñïõ âñßóêåôáé óôï óçìåßï (×1,Õ1) êáé ç êÜôù äåîéÜ óôï (×2,Õ2). Ì ï í Ü ä á : Crt  ë Ý ð å : ClrEol, ClrScr, DelLine, GotoXY, WhereX, WhereY

Write

(Äéáäéêáóßá)

Write (ãéá áñ÷åßï ìå ôýðï) Ó ý í ô á î ç : Write(F: filetype; V1 [, V2,...,Vn ]: type ); ÃñÜöåé ìßá Þ ðåñéóóüôåñåò åããñáöÝò ôïõ áñ÷åßïõ ðïõ Ý÷åé ãßíåé Assign ìå ôç ìåôáâëçôÞ áñ÷åßïõ F, áðü ìéá Þ ðåñéóóüôåñåò ìåôáâëçôÝò. ÔåëéêÜ ï äåßêôçò áñ÷åßïõ ìåôáêéíåßôáé óôçí åðüìåíç åããñáöÞ áðü áõôÞ ðïõ ãñÜöôçêå ôåëåõôáßá. Write (ãéá áñ÷åßá êåéìÝíïõ) Ó ý í ô á î ç : Write( [ var F: text; ] V1 [,V2,...,Vn ]: string ); ÃñÜöåé ìéá Þ ðåñéóóüôåñåò ãñáììÝò óå Ýíá áñ÷åßï êåéìÝíïõ áðü ìéá Þ ðåñéóóüôåñåò ìåôáâëçôÝò.  ë Ý ð å : Read, Readln, Writeln

Writeln

(Äéáäéêáóßá)

Ó ý í ô á î ç : Writeln( [ var F: text; ] V1 [,V2,...,Vn ]: string ); Åêôåëåß ôç Write êáé ìåôÜ âÜæåé Ýíá óçìÜäé ôÝëïõò ãñáììÞò.  ë Ý ð å : Write

Áè. Å. Êïõôóïíéêüëáò


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.