RSS Forums RSS
Please support our Pascal and Delphi advertiser: Programming Forums

Pascal Examples

Join Date: Mar 2007
Posts: 14
Reputation: cigar is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
cigar cigar is offline Offline
Newbie Poster

Re: Pascal Examples

  #10  
Mar 29th, 2007
[quote=needs_help;295228]{this makes a great deal of colors}
[code]
program lights;
uses crt;
var a,b:integer;
label 1;
begin
textbackground(white);
clrscr;
for a:=1 to 1000000 do inc b;*
randomize;
1:
a:=random(4)+1;
if a=1 then textbackground(blue);
if a=2 then textbackground(red);
if a=3 then textbackground(green);
if a=4 then textbackground(yellow);
write(' ');
goto 1;
end.
where you find this * there is trouble. I will show you the error the program is telling me.
* Error 88 : "(" expected.
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 9:24 am.
Newsletter Archive - Sitemap - Privacy Statement - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC