home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
PASCAL
/
TTTDEM51.ZIP
/
STRNDEM2.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1989-01-31
|
2KB
|
59 lines
Program StrnTTT5_Demo_2;
{$V-}
uses CRT, FastTTT5, ReadTTT5, WinTTT5, StrnTTT5;
var
Ch : char;
DemoStr : string;
Procedure Output_Strings;
{}
begin
FBox(1,1,80,15,yellow,blue,2);
WriteCenter(2,lightcyan,blue,'"'+DemoStr+'"');
WriteAt(3,4,lightgray,blue,'Upper:');
WriteAt(30,4,yellow,blue,'"'+Upper(DemoStr)+'"');
WriteAt(3,5,lightgray,blue,'Lower:');
WriteAt(30,5,yellow,blue,'"'+Lower(DemoStr)+'"');
WriteAt(3,6,lightgray,blue,'Proper:');
WriteAt(30,6,yellow,blue,'"'+Proper(DemoStr)+'"');
WriteAt(3,7,lightgray,blue,'Total words:');
WriteAt(30,7,lightgreen,blue,Int_To_Str(WordCnt(DemoStr)));
WriteAt(3,8,lightgray,blue,'Posn. Word 3:');
WriteAt(30,8,lightgreen,blue,Int_to_Str(PosWord(3,DemoStr)));
WriteAt(3,9,lightgray,blue,'Words 2..5 are:');
WriteAt(30,9,yellow,blue,'"'+ExtractWords(2,4,DemoStr)+'"');
WriteAt(3,10,lightgray,blue,'Strip Leading spaces:');
WriteAt(30,10,yellow,blue,'"'+Strip('L',' ',DemoStr)+'"');
WriteAt(3,11,lightgray,blue,'Strip Trailing spaces:');
WriteAt(30,11,yellow,blue,'"'+Strip('R',' ',DemoStr)+'"');
WriteAt(3,12,lightgray,blue,'Strip Lng. & Tng. spaces:');
WriteAt(30,12,yellow,blue,'"'+Strip('B',' ',DemoStr)+'"');
WriteAt(3,13,lightgray,blue,'Strip All spaces:');
WriteAt(30,13,yellow,blue,'"'+Strip('A',' ',DemoStr)+'"');
end; {of proc Output_Strings}
begin
Clrscr;
DemoStr := ' TechnoJock''s Turbo Toolkit string demo ';
OutPut_Strings;
With RTTT do
begin
EraseDefault := true;
end;
Repeat
Read_String(20,18,48,'^ Enter a new string or ESC ',1,DemoStr);
If R_Char <> #027 then
OutPut_Strings;
until R_Char = #027;
WriteAT(1,20,white,black,'Run DemoTTT.exe for the main demo program');
WriteAT(1,21,white,black,'TechnoJock''s Turbo Toolkit v5.0');
GotoXY(1,22);
end.